Build trust between Linux hosts
Establish a trust between host A and Host B so that host a can ssh to host B without a password.
Execute SSH-KEYGEN-T rsa-b 1024 on the ◦a host (can also use SSH-KEYGEN-T dsa-b 1024)
◦ in the home directory. SSH Directory
◦ into the ~/.ssh directory
◦ Execute cat id_rsa.pub will display the result copy (also can use cat id_dsa.pub, this is generally available)
◦b the ~/.SSH on the host directory (if not, perform Ssh-keygen build)
◦ Paste the copied results into the B host. The last line of the Authorized_keys file under the SSH directory
◦ok, trust relationship established, in host A on the implementation of SSH User@b first execution, will prompt a confirmation, select Yes return, the result does not enter a password, login success!
There are three points to pay attention to the place, if the above method has been done, or not, then compare the bottom three:
The ◦authorized_keys file must be a 600 permission (i.e.-RW ——-) or 644
The ◦.SSH directory must be 700 permissions (i.e. drwx--)
The ◦/home/work directory must be 755 rights drwxr-xr-x
Section (3) too pits, because the/home/user directory is 777, not 755, how can not, trust relationship can not build up, and finally the/home/user directory permissions from 777 to 755 on the set up ... >_<, what a big hole ...