Ubuntu16.04 server configuration ssh password-free login, ubuntu16.04ssh
The original document is in English. The link is to write/home/try/in the region-t rsa file /. ssh/server_rsa, do not use the default value, I named server_rsa worried about affecting git's key (because my git uses the default value) ssh-copy-id root@123.45.56.78 (your server ip ), or use cat ~ /. Ssh/id_rsa.pub | ssh user@123.45.56.78 "mkdir-p ~ /. Ssh & cat> ~ /. Ssh/authorized_keys "to upload the client key to the server ~ The/. ssh/authorized_keys file can also be copied manually. On the server side, change sudo nano/etc/ssh/sshd_config to without-password, and enable root password-free logon, that is, PermitRootLogin without-password.Ssh shorthand skillsVim ~ /. Add Host lisa via ssh/config. Remember to add HostName 188.166.225.189 your server ip address User root Port 9999 (custom Port, not recommended) (the last two are not used, the first three are sufficient) IdentityFile ~ /. Ssh/id_rsa Authentication key location, if has been transferred to the server does not need this can be achieved using ssh lisa to replace the ssh root@188.166.225.186 Effect