Linux Remote Login ssh password-free
I. Scene company has just a few Linux instances. Now we need to remotely log on to hosts using ssh without a password. II. The principle is very simple. Use ssh-keygen to generate private and public keys on host A, and copy the generated public keys to remote host B, you can use the ssh command to log on to host B on another machine without a password. 3. Step host A: 1. Generate the public key and Private Key Files id_rsa and id_rsa.pub (press Enter 3) [root @ bogon ~] # Ssh-keygen-t rsaGenerating public/private rsa key pair. enter file in which to save the key (/root /. ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in/root /. ssh/id_rsa.Your public key has been saved in/root /. ssh/id_rsa.pub.The key fingerprint is: 67: da: 0d: 79: e0: d6: 2b: cd: 7d: 22: af: 51: 7e: 9c: 75: fe root @ bogonThe key's randomart Image is: + -- [RSA 2048] ---- + |. |. + | s B o. o | ** = o + |. o B +. = |. ++. |... E | + --------------- + 2. The ssh-cop-id command will copy the specified public key file to the remote computer [root @ bogon ~] # Ssh-copy-id-I ~ /. Ssh/id_rsa.pub [email protected] The authenticity of host' 10. 1.250.166 (10.1.250.166) 'Can't be established. RSA key fingerprint is c8: 9d: 6d: 92: 55: 77: 3d: 3e: af: f5: cb: 18: 80: 5a: 47: 93.Are you sure you want to continue connecting (yes/no )? YesWarning: Permanently added '10. 1.250.166 '(RSA) to the list of known hosts. reverse mapping checking getaddrinfo for bogon [10.1.250.166] failed-possible break-in attempt! [Email protected]'s password: