ITeye博客

Ubuntu Server 14.04 下root无法ssh登陆

codyJava · 2015-08-31 15:10 · ubuntu · 操作系统 · Markdown

#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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。