Linux builds trust, has been added to Authorized_keys, is unsuccessful; permissions issues

Source: Internet
Author: User

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 ...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.