江明涛的博客
Centos7 配置禁止密码登录
Centos7 配置禁止密码登录

Centos7 配置禁止密码登录

修改ssh配置文件

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

重启ssh 服务

systemctl restart sshd.service