第2篇 SercureCRT使用root远程登录ubuntu16.04

来源:互联网 发布:ubuntu修改hosts翻墙 编辑:程序博客网 时间:2024/06/06 12:57

1.修改50-ubuntu.conf配置文件

sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf

在尾行添加:

greeter-show-manual-login=true

回到命令行,使用如下命令:

sudo passwd root

输入两次密码

此时,ubuntu自身可以使用root登录

2.修改配置sshd_config配置文件

sudo gedit /etc/ssh/sshd_config

找到Authentication配置部分,将PermitRootLogin without-password修改为PermitRootLogin yes,然后保存。

# Authentication:LoginGraceTime 120#PermitRootLogin without-passwordPermitRootLogin yesStrictModes yes

3、重启ssh服务,既可以通过SercureCRT正常连接服务器

service ssh restart
原创粉丝点击