SSH no password login under Linux setup

Source: Internet
Author: User

SSH configuration host a:10.0.5.199 host b:10.0.5.198 need to configure host a without password logon host A, Host B first ensure that all the host's firewall is turned off. Perform the following on host a: 1. $CD ~/.ssh 2. $SSH-keygen-t RSA--------------------and then press ENTER, the generated key is saved in the. ssh/id_rsa file as the default option. 3. $CP id_rsa.pub Authorized_keys This step, under normal circumstances can be no password login to the machine, that is, ssh localhost, no need to enter a password.   4. $SCP Authorized_keys [email protected]:/home/summer/.ssh------to copy a copy of the Authorized_keys file that was just generated to host B.   5. $chmod Authorized_keys enter the. SSH directory of Host B and change the permissions of the Authorized_keys file. (4 and 5 can be synthesized one step, the execution: $ssh-copy-id-i [email protected]) Normally, after the completion of a few steps above, from host a machine to host A, Host B is located on the machine to initiate an SSH connection, only the first time you need to enter a password to login, You don't need it later.   Problems you may encounter: 1. When SSH is logged in, it appears: "Agent admitted failure to sign using the key". Execution: $ssh-add forcibly add the private key in. 2. If there is no error prompt, you can enter the password to log in, but you cannot login without password, on the connected host (such as a to B to initiate an SSH connection, then on B) perform the following steps: $chmod o-w ~/$chmod ~/.ssh $chmod ~/.ssh/au Thorized_keys3. If you do a 2nd step, you cannot log in without a password, try the following $ps-af |       The grep agent checks whether the SSH proxy is on, if it is on, kill the agent, then execute the following, reopen an SSH proxy, if it is not, execute the following directly: $ssh-agent or not, perform the following, restart the SSH service $sudo ServicE sshd restart4.  "Could not open a connection to your AUTHENTICATIONH agent" fails to execute when Ssh-add is executed: ssh-agent bash

  

SSH no password login under Linux setup

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.