重啟
sudo service ssh restart以憑證連線
用ssh-keygen產生公私鑰
用scp把.pub上傳到目標電腦的~/.ssh/底下
scp <id_rsa.pub> <user>@<ip>:~/.ssh/<name>.pub把該檔名寫進authorized_keys
cat ~/.ssh/<name>.pub >> ~/.ssh/authorized_keys取消密碼登入
在被連線機器的/etc/ssh/sshd_config
PasswordAuthentication no然後 重啟
]