Linux does not need to enter the password own active login Sshserver method

Source: Internet
Author: User

When landing sshserver under Linux with OpenSSH. Every time you are prompted to enter password, and use the Vim netrw plugin to edit the remote file after each change to save to lose password, very troublesome.

Looking at the help documentation for NETRW, I found that I have introduced the method of proactively landing sshserver:

1. Create a public/private key pair (on the client machine)

SSH-KEYGEN-T RSA (Saving the file in ~/.ssh/id_rsa as prompted)
After entering the above command (without input in parentheses), you will be prompted to enter passphrase. Press ENTER two times directly. Do not use passphrase.

You can see the two files generated under the ~/.ssh folder, Id_rsa and Id_rsa.pub.

Tip: Assume that the. SSH folder already has the Id_rsa key file, can also be changed to other names, but also to be placed under the. SSH folder.


2. Create a new. SSH folder on the Sshserver

Log in to Sshserver and enter the following command

Cdmkdir-p. Sshchmod 0700. SSH

3. Establish authentication keys in server

On the client machine (note that it is not on the server), enter the following command

SSH serverhostname cat ' >> ' ~/.ssh/authorized_keys ' < ~/.ssh/id_rsa.pub

Enter the login password.


4. OK, done, ssh serverhostname login server try, should not input password.

Linux does not need to enter the password own active login Sshserver method

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.