Google云计算(GCE)修改密码并允许root登录 Linux

mowen 2019-08-13 2026

1、在浏览器中打开ssh

2、切换root

sudo -i

3、修改密码

passwd

4、修改登录权限

sed -i 's/PermitRootLogin no/PermitRootLogin yes/g' /etc/ssh/sshd_config
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config

5、重启生效

reboot


最新回复 (0)
返回
发新帖
X