Ubuntu Server 14.04 下root无法ssh登陆

今天安装了Ubuntu Server 14.04   在终端配置了root密码后,使用SecureCRT和putty竟然不能ssh登陆,SecureCRT一直提示密码不对,但是可以肯定输入的密码100%正确,用putty则一直报Access Denied,所以可以肯定系统限制了root不允许远程ssh登陆。

但是普通用户远程ssh登录后su root正常!  why?

原来sshd_config里面有了限制

#vim /etc/ssh/sshd_config

1
2
3
4
5
# Authentication:

LoginGraceTime 120

#PermitRootLogin without-password    #找到这里,把它注释

PermitRootLogin yes                  #改为yes  然后重启<a href="http://so.21ops.com/cse/search?s=9181936462520079739&entry=1&q=ssh" class="bdcs-inlinelink" target="_blank">ssh</a>
StrictModes yes




#service ssh restart



#Tips:这里注意/etc/init.d/ssh restart 用这个方式重启是不成功的。

posted @ 2015-11-09 14:06  陌上归人的博客  阅读(1461)  评论(0编辑  收藏  举报