Ubuntu Server 14.04 下root无法ssh登陆

#vim /etc/ssh/sshd_config

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

 #service ssh restart



/etc/init.d/ssh restart

获取root权限

方法一:

1. set a password for root:   sudo passwd root

2. using command to get root role: su

3. enter the root's password set in step 1

 方法二:

1. login ubuntu with customer account

2. run command: sudo su

3. enter customer account's password

相关推荐