关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

Ubuntu无法使用root用户登陆的解决办法

发布时间:2023-05-06 13:38:59
1491984010112764.jpg

对于一个新安装的Ubuntu操作系统,经常会遇到无法使用root用户ssh连接操作系统,比如说root用户的密码被拒绝等原因。

面对这种问题,介绍一下Ubuntu无法使用root登陆解决

1. 修改 root 密码

sudo passwd root

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

server@ubuntu:~$ su root

Password:

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

3.修改PermitRootLogin without-passwor 为 PermitRootLogin yes

4. 重启 ssh  服务

root@ubuntu:~# service ssh restart

ssh stop/waiting

ssh start/running, process 1499

root@ubuntu:~#

操作完成,然后重新通过root连接就可以。



/template/Home/8a/PC/Static