Linux设置允许root账户登录SSH

编辑文件/etc/ssh/sshd_config, 找到下面这行:

#PermitRootLogin prohibit-password
改成

PermitRootLogin yes
即可。记得去掉PermitRootLogin前面的注释符#.

然后,执行下面的命令即可生效:

systemctl restart ssh

Tagged on: ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.