修改ssh配置文件

Text
vim /etc/ssh/sshd_config
将PasswordAuthentication参数值修改为no: PasswordAuthentication no

重启ssh 服务

Text
systemctl restart sshd.service