指点成金-最美分享吧

登录

Ubuntu系统root用户远程登录

佚名 举报

篇首语:本文由小编为大家整理,主要介绍了Ubuntu系统root用户远程登录相关的知识,希望对你有一定的参考价值。

 通过CRT远程登录Ubuntu时遇到报错:

The client has disconnected from the server.  Reason:

Unable to authenticate using any of the configured authentication methods.  

Ubuntu初始登录只能是普通用户,想用root登录,需普通用户登录,然后切换为root用户,先设置root密码,再更改sshd_config文件

ixo@snort:~$ sudo su
Password:
root@snort:/home/ixo#sudo passwd root
New password:
Retype new password:
passwd: password updated successfully
root@snort:/home/ivo# nano /etc/ssh/sshd_config

注意:是sshd_config,而不是ssh_config

...
#port 22
port 22
#PermitRootLogin prohibit-password
PermitRootLogin yes # 允许root直接登录
...

保存后重启ssh服务

sudo service ssh restart


以上是关于Ubuntu系统root用户远程登录的主要内容,如果未能解决你的问题,请参考以下文章