[转] 允许root通过ssh远程登录
在Ubuntu中允许root远程访问
如果使用如xshell等远程工具首次通过root连接Ubuntu会提示拒绝访问,并不是密码不正确,而是Ubuntu默认禁止以root远程连接。
我们可以进行适当的配置来使root远程连接可用。
1.首先在本机使用root修改/etc/ssh/sshd_config文件。
vim /etc/ssh/sshd_config
- 1
将PermitRootLogin的值改为yes,将PermitEmptyPasswords修改为no(原来就是no则不用修改),然后保存退出。
2.重启ssh服务
service ssh restart
- 1
3.使用xshell重新尝试即可。
---------------------
作者:weijian001 来源:CSDN 原文:https://blog.csdn.net/wj1066/article/details/73478114?utm_source=copy
版权声明:本文为博主原创文章,转载请附上博文链接!