甲骨文VPS使用一键开启ROOT密码登录

此方式同样适用于其他VPS

sudo -i
echo root:你的新密码 |sudo chpasswd root
sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
service sshd restart
posted @ 2021-12-07 09:29  F2Sky丶  阅读(2899)  评论(0)    收藏  举报