linux系统中root用户无所不能,为了系统安全ssh禁止root用户远程登录,必要的话使用sudo机制也是不错的选择
编辑 /etc/ssh/sshd_config
修改 PermitRootLogin将yes改为no

禁用ssh密码登陆:

PasswordAuthentication no
重启ssh服务
service sshd restart 或
/etc/init.d/sshd restart
Published in Linux

No Responses to “ssh禁止root用户远程登录和禁止密码登录”

Leave a Reply

请输入算式结果(看不清请点击图片)
(必须)