编辑其配置文件,输入以下命令进行修改:
ee /etc/ssh/sshd_config然后进行修改.


找到
#PasswordAuthentication no 修改为:
PasswordAuthentication yes

这段的意思是,让SSH使用密码验证登陆.

找到
#PermitRootLogin no 修改为
PermitRootLogin yes
这段的意思是,让SSH准许root用户登录.一般来说,为了安全起见,这一段还是不要允许的好.不过安全要求不高,可以这样做.

找到
#PermitEmptyPasswords no修改为
PermitEmptyPasswords no这段的意思是,使得允许空密码成为不可用,换句话说就是,不允许空密码登陆.

etc/rc.d/sshd restart 重启sshd服务,即可实现root用户远程ssh登录,当然咯,最好是不要用root登录啦。。

本文出自 “可爱的小白” 博客,请务必保留此出处http://lemon12911.blog.51cto.com/237961/449247