Password-free logon and SSH Password Logon in SSH
1: Execute the command ssh-keygen rsa to generate the key, located in ~ /. Ssh folder (if there is any prompt during this period, press enter all the way and do not enter anything)
2: run the command cp ~ /. Ssh/id_rsa.pub ~ /. Ssh/authorized_keys. If yes/no is displayed, enter yes.
Verify ssh localhost.
How to implement secure password-free ssh Login
Home ?? Blogs ?? Jianing Yang's blog Submitted by Jianing Yang on Fri, SSH password-free O & M background ssh implements encrypted remote login. however, as a system administrator, frequent Password Input often breaks down when many machines need to be operated. fortunately, you have read this article and it will show you how to implement secure and convenient password-free ssh login. to create an ssh public/private key, you must first discard the Password Logon method, because that method is too messy. next we will start to use a public/private key authentication method for ssh login. the simple explanation of the "Public/Private Key" authentication method is that you need to create a pair of public/private keys and then put the public keys on the server. Keep the private key yourself when logging on to the server through ssh, the ssh program will send a private key to match the public key on the server. if the match is successful, we can log on to the system. Now we have two machines: qian.jianingy.com (this is our server, actually it is mine), nby. jian Ingy.com (this is my notebook). First, use the ssh-keygen program to create a public/private key pair in the notebook to generate a public/private key jianingy @ nby :~ $ Ssh-keygen
Ssh password-free settings
Set the. ssh directory to 700 and have the execution permission.
Set authorized_keys to 600. Otherwise, an error occurs.
For example
Ssh root @ localhost