Debian11 切换Root登录
一、打开终端,用普通用户登录
输入:su
输入密码,切换到root用户
二、设置root用户登录
==nano /etc/ssh/sshd_config==
三、修改配置
修改sshd_config文件,命令为:
nano /etc/ssh/sshd_config
将#PasswordAuthentication no的注释去掉,并且将no修改为yes
将#PermitRootLogin prohibit-password的注释去掉,将prohibit-password改为yes
启动SSH服务,命令为:/etc/init.d/ssh start // 或者service ssh start
验证SSH服务状态,命令为:/etc/init.d/ssh status