甲骨文云默认登录的用户名是ubuntu和私钥的方式登录vps,我们可以修改为root加密码登录vps

网友分享的两种方法
方法1
sudo -i切换到root
passwd设置密码
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
reboot重启服务器
方法2
sudo -i 用root身份
passwd 设置root密码
vi /etc/ssh/sshd_config 修改配置文件
PermitRootLogin yes
PasswordAuthentication yes
reboot重启服务器
最近龙虾很火,但是用处不大,安全隐患。
是,最近开始预警了。