Use SSH to manage remote Linux servers without a password

Source: Internet
Author: User

SSH is a good thing. It is always dark every time you go to the server. However, it has always been a long password (server security considerations). Every time you use SSH, you always need a long password.

Although we know that SSH can be managed by using keys, it only takes 10 minutes to try again today ,...... Wow, really ...... I don't know if I don't try it. It's really easy to try it.

 

First define a command: SSH user@www.www.com-I id_rsa

Where-I id_rsa indicates that the key is used. However, if this parameter is not set, SSH will also be in the default location (~ /. Ssh/) to search for the id_rsa file. Therefore, you only need to generate ~ /. Ssh/id_rsa does not need to be added.


OK, start:

Generate key:Ssh-keygen-t rsa will be generated directly ~ /. Ssh/id_rsa and ~ /. Ssh/rd_rsa.pub

If I want to use user SSH to access www.www.com ~ /. Ssh/rd_rsa.pub copy to. Ssh/Authorized_keys, and pay attention to the permissions.

Basically, 644 is enough.

The last SSH user@www.www.com is okay, haha.

 

-----------------------------------

Appendix: There are two input options when generating a key. One is to generate the key file and press Enter. The other is to add a password to the key to prevent others from copying your key file, if you are not using the same computer, you are strongly advised to enter the password when using the key for the first time.

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.