欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

配置Debian允许root用户SSH登录

程序员文章站 2022-06-06 17:07:15
...

全新安装系统后,默认情况下将禁用Debian Linux上的root登录。当您尝试以root用户身份登录Debian Jessie Linux服务器时,访问将被拒绝。

要在Debian Linux系统上为root用户启用SSH登录,您需要首先配置SSH服务器。打开/etc/ssh/sshd_config并更改以下行:

从:

PermitRootLogin without-password

至:

PermitRootLogin yes

完成上述更改后,请重新启动SSH服务器:

# /etc/init.d/ssh restart
[ ok ] Restarting ssh (via systemctl): ssh.service.

 

从现在开始,您将能够以root用户身份使用ssh登录: