linux系统中root用户无所不能,为了系统安全ssh禁止root用户远程登录,必要的话使用sudo机制也是不错的选择 编辑 /etc/ssh/sshd_config 修改 PermitRootLogin将yes改为no
禁用ssh密码登陆:
PasswordAuthentication no
重启ssh服务 service sshd restart 或 /etc/init.d/sshd restart
linux系统中root用户无所不能,为了系统安全ssh禁止root用户远程登录,必要的话使用sudo机制也是不错的选择 编辑 /etc/ssh/sshd_config 修改 PermitRootLogin将yes改为no
PasswordAuthentication no
重启ssh服务 service sshd restart 或 /etc/init.d/sshd restart