甲骨文开启Root登录

之前申请了甲骨文的vps,但是它登录是用密钥验证的,在日常使用中十分不方便,所以记录一下切换的方法。

一、切换账号

sudo -i

二、设置密码(a123456要改成你自己的密码)

echo root:a123456|sudo chpasswd 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;

四、重启

sudo service sshd restart

发表评论

电子邮件地址不会被公开。 必填项已用*标注