Ubuntu root不能ssh登陆问题解决!

今天安装了Ubuntu  Server 14.04   发现配置了root密码后

竟然不能ssh登陆,但是su root正常!  why?

 

原来新版本里面sshd_config里面有了限制

#vim /etc/ssh/sshd_config


# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password   
 #找到这里,把它注释
PermitRootLogin yes                  #改为yes  然后重启ssh
StrictModes yes


#service ssh restart

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