- 修改配置文件vim /etc/ssh/sshd_config
PermitRootLogin no
PubkeyAuthentication yes
- 重启sshd服务
systemctl restart sshd.service
PermitRootLogin no
PubkeyAuthentication yes
systemctl restart sshd.service
转载于:https://my.oschina.net/pasenger/blog/1608690