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