First of all. Guaranteed to ping through
Then run for example the following command,
Master login Slave
Master runs above for example the following directives:
2.4 Confirm the configuration file (root) of the native sshd
$ vi/etc/ssh/sshd_config
Find the following and remove the gaze "#"
Rsaauthenticationyes
Pubkeyauthenticationyes
Authorizedkeysfile.ssh/authorized_keys
2.5 If you change the configuration file, you need to restart the sshd service (root)
$ vi/sbin/service sshd Restart
If there is no change, the above steps omit,
The following continues
2.7 Steps to generate a certificate public private key
$ssh-keygen-t dsa-p "-F ~/.SSH/ID_DSA
$ cat~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
2.8 Test Login SSH localhost
$ ssh localhost
Under normal circumstances will log on successfully, showing some successful login information.
At last:
$cat ~/.ssh/id_dsa.pub | SSH remote [email protected] remote ServerIP ' cat->> ~/.ssh/authorized_keys '
CentOS, high-speed setup SSH no password login