Ssh password-free login, ssh password login

Source: Internet
Author: User

Ssh password-free login, ssh password login

Ssh password-free Login

Note:

Ssh password-less logon requires the public key and private key.

In linux or mac systems, you can use ssh-keygen to generate public/private key pairs.

 

1. Generate a key (~ /. Generate id_rsa and id_rsa.pub under the ssh directory.

Ssh-keygen-t rsa

2. Send the public key to the remote host ~ /Directory

Scp ~ /. Ssh/id_rsa.pub root@192.168.0.0 :~ /

3. log on to the remote host and append the public key to the authorization key.

Cat ~ /Id_rsa.pub> ~ /. Ssh/authorized_keys (grant 600 permission to chmod 600 authorized_keys)

4. Now you can log on normally.

Ssh root@192.168.0.0

5. To simplify login operations

~ /. Bashrc, add the following line: alias loginssh = "ssh root@192.168.0.0" and then source ~ /. Bashrc

6. Then you can log on more easily.

Loginssh

 

Note: The above operations are based on the company's test server ~~

 

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.