SSH password-less logon configuration under ubunt/centos

Source: Internet
Author: User

Recently configured CEpH distributed storage. You need to log on via SSH without a password. After checking some information, record it here (My centos system demonstration here ).


First, enter the shell command on the system terminal:

 
[Root @ PS-12 CEpH] # ssh-keygen-T RSA

(Suggestion: After you press enter, all are default. Do not enter the password. Press enter all the time .)

The default value is ~ /. Generate two files in the SSH directory:Id_rsa (Private Key ),Id_rsa.pub (Public Key ).

Copy id_rsa.pub to the login server as the authentication file:

 
[Root @ PS-12 CEpH] # SCP ~ /. Ssh/id_rsa.pub root @ PS-13 :~ /. Ssh/authorized_keys


Then, grant the. SSH and authorized_keys permissions:

 
Chmod 700 ~ /. SSHChmod 600 ~ /. Ssh/authorized_keys


Test:

In this case, restart SSH:

#/Etc/init. d/sshd restart

Login Server:

 
# SSH PS-13

To log on for the first time, you must configure the kown_hosts file. You may need to confirm yes. Then you can log on directly.


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.