甲骨文云服务器如何密码登录?

By | 2022-08-21

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

就可以了