On the client operation
File location write/home/try/.ssh/server_rsa, do not use default values, I named Server_rsa worry about the impact of Git key (because my git is using the default value)
Ssh-copy-id root@123.45.56.78 (Your server IP),
or this use
Cat ~/.ssh/id_rsa.pub | SSH user@123.45.56.78 "mkdir-p ~/.ssh && cat >> ~/.ssh/authorized_keys"
You can upload your client key to the server's ~/.ssh/authorized_keys file or manually copy it.
Operating on the server side
sudo nano/etc/ssh/sshd_config
Change this to Without-password to achieve root-free login
namely Permitrootlogin Without-password
SSH Shorthand Tips
Add to
Host Lisa casually, just remember.
HostName 188.166.225.189 Your server IP
User Root
Port 9999 (ports from custom, recommended not add) (the last two I have not used, the first three sufficient)
Identityfile ~/.SSH/ID_RSA Certified key location, if it's already uploaded to the server.
Can be implemented using SSH Lisa instead of ssh root@188.166.225.186 effect
The above is a small set to introduce the ubuntu16.04 server configuration ssh password-free login, I hope to help you, if you have any questions please give me a message, small series will promptly reply to everyone. Here also thank you very much for the cloud Habitat Community website support!