📜  ssh only key - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:43.851000             🧑  作者: Mango

代码示例1
#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