ubuntu 16.04 SSH trust

1. There Host A and Host B. (Need to modify the hostname, then trust after the success of the machine name to ssh)

2. In the two machines were installed ssh service:

  Execute: sudo apt-get install openssh-server installation

  Execute: sudo service sshd start enabled

3. Modify A machine to perform the following in / etc / ssh / ssh_config file and save and exit

  Read: StrictHostKeyChecking no

4. A machine performing: root @ 192: ~ # ssh-keygen -t rsa, with a message, press Enter. Enter total of three times. Automatically generates two files id_rsa and id_rsa.pub

5. A machine performing: B to copy the contents of id_rsa.pub machine /root/.ssh/authorized_keys file. (Manually created file)

 600 gives permission: chmod 600 authorized_keys

6. A machine remote machine B without a password.

 ssh B (B machines hostname)

 

 7. Complete

 

Guess you like

Origin www.cnblogs.com/testing-BH/p/11693704.html