VPS改root登录

sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config
passwd root
sudo service sshd restart

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注