推扬网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
推扬网 › 门户 ›互联网动态 › 查看内容

问题:Ubuntu SSH允许root用户远程登录

2020-5-27 14:50| 发布者: admin| 查看: 131| 评论: 0

摘要: 修改 root 密码 sudo passwd root 2. 以其他账户登录,通过 sudo nano 修改 /etc/ssh/sshd_config : xxx@ubuntu14:~$ su - root Password: root@ubuntu14:~# vi /etc/ssh/sshd_config 3. 注释掉 #Pe ...

修改 root 密码

sudo passwd root

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

xxx@ubuntu14:~$ su - root

Password:

root@ubuntu14:~# vi /etc/ssh/sshd_config

3. 注释掉 #PermitRootLogin without-password,添加 PermitRootLogin ye

# Authentication:

LoginGraceTime 120

#PermitRootLogin without-password

PermitRootLogin yes

StrictModes yes

4. 重启 ssh 服务


root@ubuntu14:~# sudo service ssh restart

ssh stop/waiting

ssh start/running, process 1499

root@ubuntu14:~# 

sudo passwd root

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

xxx@ubuntu14:~$ su - root

Password:

root@ubuntu14:~# vi /etc/ssh/sshd_config

3. 注释掉 #PermitRootLogin without-password,添加 PermitRootLogin ye

# Authentication:

LoginGraceTime 120

#PermitRootLogin without-password

PermitRootLogin yes

StrictModes yes

4. 重启 ssh 服务


root@ubuntu14:~# sudo service ssh restart

ssh stop/waiting

ssh start/running, process 1499

root@ubuntu14:~# 


鲜花

握手

雷人

路过

鸡蛋

最新评论

推荐阅读
精彩推荐

广告服务|投稿要求|禁言标准|版权说明|免责声明|手机版|小黑屋|推扬网 ( 粤ICP备18134897号 )|网站地图 | 邮箱:vayae@hotmail.com

GMT+8, 2026-11-13 06:45 , Processed in 0.103593 second(s), 28 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

返回顶部