📅  最后修改于: 2022-03-11 14:49:43.851000             🧑  作者: Mango
#On Client:
ssh-keygen -t rsa
scp ~/.ssh/id_rsa.pub username@hostname:~/.ssh/authorized_keys
#On Server (to disable passwords and only allow key)
sudo nano /etc/ssh/sshd_config
#change "PasswordAuthentication yes" --> "PasswordAuthentication no"
#remove "#" in front of the line if present