新安装的系统,默认情况下禁用Debian Linux上的root登录。
当我们尝试使用root用户身份登录到Debian Jessie Linux服务器时,可以拒绝访问权限:
$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: Permission denied, please try again. root@10.1.1.12's password: Permission denied (publickey,password).
在Debian Linux系统上启用root用户的SSH登录,我们需要先配置SSH服务器。
打开/etc/ssh/sshd_config并更改以下行:
FROM: PermitRootLogin without-password TO: PermitRootLogin yes
完成上述更改后,重新启动SSH服务器:
# /etc/init.d/ssh restart [ ok ] Restarting ssh (via systemctl): ssh.service.
从现在开始,我们将能够作为root登录:
$ssh root@10.1.1.12 root@10.1.1.12's password: The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
日期:2020-07-07 20:56:06 来源:oir作者:oir
