GCP,oralce,aws开启root登录
主要思路
大同小异,修改 sshd——config
文件,把里面的 PasswordAuthentication
和 PermitRootLogin
都改成 Yes
修改SSH配置文件/etc/ssh/sshd_config
vi /etc/ssh/sshd_config |
找到PermitRootLogin和 PasswordAuthentication
# Authentication: |
重启SSH服务
Ubuntu/debian适用
/etc/init.d/ssh restart |
Centos 7适用
systemctl restart sshd.service |
方便起见
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 |
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment