SSH password-less secure logon and ssh password-based Logon

Source: Internet
Author: User

SSH password-less secure logon and ssh password-based Logon

Client:

Ssh-keygen-t rsa

Server

Mkdir. ssh

Chmod 755. ssh

Upload the public key from the client to the server

Scp. ssh/id_rsa.phb Server ip Address:. ssh/authorized_keys


I have four ubuntu machines that enable ssh and password-less login to each other. One machine A can log on to B, C, and D without A password, but B, C, and D cannot log on to A without A password.

Is this account a local account or an NIS account?
If it is a local account, check whether the permissions of the home directory of the account are the same. It seems that the permissions cannot be 777.
The problem should be found above A. Check whether selinux of A is disabled, and whether there is A problem with hosts configuration.

Ssh does not require a logon password. How can I configure it?

Here is an example:
192.168.1.1 --- client
192.168.1.2 --- slave

First on 192.168.1.1
Ssh-keygen
Generate id_rsa id_rsa.pub
Copy the content in id_rsa.pub
Create the authorized_keys file in the/root/. ssh/directory of 192.168.1.2
Copy the content in id_rsa.pub of 192.168.1.1 to the authorized_keys file.

Then execute ssh-keygen on 1.2.
Copy the content in id_rsa.pub to/root/. ssh/authorized_keys at 192.168.1.1.

Now you can try it!

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.