vps改root登录

29 字 约 1 分钟

sudo -i

passwd

sed -i ‘s/^#?PermitRootLogin ./PermitRootLogin yes/’ /etc/ssh/sshd_config &&
sed -i ‘s/^#?PasswordAuthentication .
/PasswordAuthentication yes/’ /etc/ssh/sshd_config

systemctl restart sshd || systemctl restart ssh

评论

加载中…