SSH password-free login (root) under Linux

Configure host A to log in to host A without a password, host B
eg:
A:192.168.113.181
B:192.168.113.182
Perform the following on host A:
 1. 
$ssh-keygen -t rsa -P ''
-------------------- Then keep pressing the Enter key, and the generated key will be saved in the .ssh/id_rsa file according to the default option
 2. 
ssh-copy-id -i id_rsa.pub [email protected]


Just two simple steps, you can achieve it!
  Test it:
  [root@localhost .ssh]# ssh 192.168.113.182
  Last login: Tue Jan  5 14:48:10 2016 from 192.168.113.181

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326798947&siteId=291194637