迫于嫖到甲骨文服务器,设置root用户登录~

甲骨文服务器默认登录用户opc 而且必须秘钥登录,不太习惯,执行如下命令更改root用户登录以及开启允许密码登录.

使用密钥登录系统以后
执行如下命令
sudo -i
输入要设置的密码
passwd

按提示刷入密码,重复输入密码。
接着输入
echo root:ve0.net |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;

重启sshd服务
sudo service sshd restart
或者重启sshd服务
/bin/systemctl restart sshd.service

最后修改:2021 年 06 月 09 日 10 : 35 AM
如果觉得我的文章对你有用,请随意赞赏

1 条评论

  1. 小李传奇技术

    此帖子终结,甲骨文封号了。莫名其妙~
    Your account has been disabled due to either tenant/user disable operation.

发表评论