Ubuntu 14.04 为 root 帐号开启 SSH 登录

安装

sudo apt-get install ssh

设置root登录

修改 root 密码

 sudo passwd root

以其他账户登录,通过 sudo nano 修改 /etc/ssh/sshd_config

xxx@ubuntu14:~$ su - root
Password:
root@ubuntu14:~# vi /etc/ssh/sshd_config

注释掉 #PermitRootLogin without-password,添加 PermitRootLogin yes

# Authentication:
LoginGraceTime 120
#PermitRootLogin without-password 
PermitRootLogin yes
StrictModes yes

重启ssh

service ssh restart

你可能感兴趣的:(Ubuntu 14.04 为 root 帐号开启 SSH 登录)