默认情况下,Ubuntu 14.04 Linux服务器禁止使用root用户进行ssh登录。
将提示类似于下面的消息:
$ ssh root@10.1.1.12 root@10.1.1.12's password: Permission denied, please try again. root@10.1.1.12's password:
要允许root通过ssh登录,(不安全)
修改配置文件/etc/ssh/sshd_config
将 PermitRootLogin without-password 改成 PermitRootLogin yes
重新启动SSHD服务使更改生效:
# service ssh restart ssh stop/waiting ssh start/running, process 6919
完成后,我们可以使用root SSH登录Ubuntu服务器:
$ ssh root@10.1.1.12 root@10.1.1.12's password: Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic x86_64)
日期:2020-07-07 20:56:00 来源:oir作者:oir