1. Copy ssh key to server
1
ssh-copy-id -i ~/.ssh/id_rsa.pub root@1.2.3.4
It will ask your password. Please input it
2. (Optional) Disable password authentication for SSH
Find PasswordAuthentication in file /etc/ssh/sshd_config and change value from yes to no
1
PasswordAuthentication no
1
service ssh restart