在Ubuntu中允许root远程访问
如果使用如xshell等远程工具首次通过root连接Ubuntu会提示拒绝访问,并不是密码不正确,而是Ubuntu默认禁止以root远程连接。
我们可以进行适当的配置来使root远程连接可用。
1.首先在本机使用root修改/etc/ssh/sshd_config文件。
vim /etc/ssh/sshd_config
将PermitRootLogin的值改为yes,将PermitEmptyPasswords修改为no(原来就是no则不用修改),然后保存退出。
2.重启ssh服务
service ssh restart
3.使用xshell重新尝试即可。