Debian11.3配置SSH允许root用户远程登录系统

系统版本 

root@localhost:~# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

说明

Debian系统安装好ssh后默认是不允许root远程登录的,如果需要开启root远程登录,则需要修改ssh配置文件即可。

修改SSH配置文件

root@localhost:~# vim /etc/ssh/sshd_config
PermitRootLogin prohibit-password //解除注释,prohibit-password改为yes
PasswordAuthentication yes        //解除注释,密码认证

重启ssh服务

root@localhost:~# service sshd restart

至此,root即可实现远程登录系统了。


版权声明:本文为yimaoya原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。