码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu远程root用户登录

时间:2021-05-24 06:45:24      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:密码   loading   sshd   png   col   ima   tar   xshell   com   

Ubuntu默认不能直接通过root用户远程登录

  如xshell登录,密码正确,提示如下:

技术图片

 

  这是因为在sshd_config中定义了

1、修改配置:

vi /etc/ssh/sshd_config

2、通过/输入PermitRootLogin 快速定位到要修改的行

技术图片

3、将#PermitRootLogin prohibit-passwd修改为PermitRootLogin yes,i编辑

PermitRootLogin yes

4、保存退出,esc退出编辑,英文输入法冒号 :wq!强制保存退出

5、重启ssh服务

systemctl restart sshd

 

 

Ubuntu远程root用户登录

标签:密码   loading   sshd   png   col   ima   tar   xshell   com   

原文地址:https://www.cnblogs.com/alexlv/p/14759427.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!