Ssh passwordless settings

Source: Internet
Author: User

Ssh password-less hand settings because many configurations on the Internet and password-less login are not easy to use, I just wrote a plug-in for your reference, I have prepared three test machines, the requirement is that all three machines can access each other without a password. The steps are as follows: www.2cto.com Java code 192.168.100.67 master 192.168.100.68 slave1 192.168.100.69 slave2 enters the master (hadoop user) and runs: ssh-keygen-t rsa to enter ~ /. The id_rsa id_rsa.pub cp id_rsa.pub authorized_keys generated by the ssh directory is then confirmed that the authorized_keys permission is 600. If not, the other chmod 600 id_rsa permissions are 644, and then the ssh master date test enters Slav ~ /. The ssh directory puts the ssh-keygen-t rsa on the master into the chmod 600 id_rsa directory. Then the ssh slave1 date test is performed on the master and slave1 to test each other. slave2 and slave1 are actually cp id_rsa.pub authorized_keys, it is best to use the cat command. I am saving things in graph. In addition, I am too lazy about scp, so it is easy to understand that three machines use the same private key, so it is enough to generate a set of public keys ~ /. The permissions of the ssh directory and the following files must be identical. If they are different, they will not work. I generally run the ssh-keygen-t rsa command on all three machines to save trouble. Then, I overwrite the key pair generated by one machine to the other two machines and use chmod as the same permission, that is, id_rsa 600 id_rsa.pub 644 authorized_keys 644. Because the keys are the same, you can connect yourself to other machines. If you cannot connect, check whether the/etc/hosts file is not configured.

Related Article

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.