允许 ssh登录 root用户


禁止 ssh使用 root登录

设置 root密码
sudo passwd root

vim /etc/ssh/sshd_config

在行尾添加如下内容:

KexAlgorithms curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1
PermitRootLogin yes
PasswordAuthentication yes

sudo systemctl restart sshd