Original information in English, link in this https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2 on the client operation Ssh-keygen-t RSA file Location Write/home/try/.ssh/server_rsa, do not use the default value, I am named Server_rsa worry about the key to git (because my git uses the default value) Ssh-copy-id [email protected] (Your server IP), or this using cat ~/.ssh/id_rsa.pub | SSH [email protected] "Mkdir-p ~/.ssh && cat >> ~/.ssh/authorized_keys" to upload your client key to the server ~/.ssh/ Authorized_keys files, you can also copy them manually. The server-side operation sudo nano/etc/ssh/sshd_config changes this to Without-password, enabling root-free login that is Permitrootlogin Without-password
ssh Shorthand TipsVim ~/.ssh/config Add Host Lisa casually up, good remember on the line HostName 188.166.225.189 your server IP User root Po RT 9999 (Port Custom, recommended not added) (The last two I did not use, the first three is sufficient) Identityfile ~/.SSH/ID_RSA certified key location, if it has been uploaded to the server will not use this one can be implemented using SSH Lisa instead The effect of SSH [email protected]
ubuntu16.04 Server configuration ssh password-free login