本次配置需要修改的ssh登录的配置文件
vi /etc/ssh/sshd_config
允许root用户远程登录
设置PermitRootLogin参数值为yes
#LoginGraceTime 2m
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
允许无密码登录
设置PermitEmptyPasswords 参数值修改为yes
# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
PermitEmptyPasswords yes
重启ssh服务
/etc/initd.d/sshd restart
设置密码为空
输入指令 passwd
提示输入密码时,直接回车即可
本文详细介绍了如何通过修改sshd_config文件来允许root用户远程登录及无密码登录,包括设置PermitRootLogin和PermitEmptyPasswords参数,并提供了重启ssh服务和设置密码为空的具体步骤。
645





