Establish an ssh Trust Relationship in linux and trust the linuxssh Service
Create SSH Trust
Use host A as the client (initiate an SSH request ip Address: 192.168.200.170)
Host B is used as the server (ip address for receiving ssh requests: 192.168.200.149)
The above lists the hosts that actively initiate SSH login requests and the hosts that receive the requests.
<1> host A generates A Public/Private Key Certificate
[Root @ buddytj-10. ssh] #Ssh-keygen-t rsa# Rsa algorithm Certificate
Generating public/private rsa key pair. (Press ENTER below)
Enter file in which to save the key (/root/. ssh/id_rsa ):
/Root/. ssh/id_rsa already exists.
Overwrite (y/n )? Y (because my certificate already exists, overwrite it)
Enter passphrase (empty for no passphrase ):
Enter same passphrase again:
Your identification has been saved in/root/. ssh/id_rsa. (private key)
Your public key has been saved in/root/. ssh/id_rsa.pub. (public key)
The key fingerprint is:
C1: 26: cc: 88: 2b: 05: dd: c3: 6b: 1e: 78: 5d: da: 9c: da: 8a
The certificate generates id_rsa (Private Key) | & id_rsa.pub (Public Key)
<2> pass the Public Key generated by host A to host B
[Root @ xyh. ssh] #Scp id_rsa.pub 192.168.200.149:/root/. ssh/
Rename A's public key on host B
[Root @ xyh. ssh] #Mv id_rsa.pub authorized_keys
<3> the remote SSH service on host A and host B has been completed.
Haha, it's super simple!
Reference from: http://xieyanhuang123.blog.51cto.com/713874/346217