linux禁用密码登录使用密钥登录
vim /etc/ssh/sshd_config
PasswordAuthentication no
ChallengeResponseAuthentication no
PermitRootLogin prohibit-password
PubkeyAuthentication yes
sudo systemctl restart sshd
ssh-copy-id -i id_rsa.pub root@192.168.1.1
vim /etc/ssh/sshd_config
PasswordAuthentication no
ChallengeResponseAuthentication no
PermitRootLogin prohibit-password
PubkeyAuthentication yes
sudo systemctl restart sshd
ssh-copy-id -i id_rsa.pub root@192.168.1.1