debian12 ssh开启root远程登录
打开SSH配置文件/etc/ssh/sshd_config并编辑该文件
vi /etc/ssh/sshd_config
查找并修改以下两行内容(如果不存在则添加):
PermitRootLogin yes
PasswordAuthentication yes
注:将PermitRootLogin设为"yes"表示允许通过SSH登录到Root账户;将PasswordAuthentication设为"yes"表示允许密码验证。
保存更改后重新启动SSH服务:
systemctl restart ssh
vi /etc/ssh/sshd_config
查找并修改以下两行内容(如果不存在则添加):
PermitRootLogin yes
PasswordAuthentication yes
注:将PermitRootLogin设为"yes"表示允许通过SSH登录到Root账户;将PasswordAuthentication设为"yes"表示允许密码验证。
保存更改后重新启动SSH服务:
systemctl restart ssh

浙公网安备 33010602011771号