默认gcp不支持远程登陆服务器,为了方便或者统一管理,可开启远程ssh登陆 登陆服务器,修改以下配置文件
sudo vim /etc/ssh/sshd_config
修改PermitRootLogin和PasswordAuthentication为yes
# 默认为no,需要开启root用户访问改为yes
PermitRootLogin yes
# 默认为no,改为yes开启密码登陆
PasswordAuthentication yes
重启sshd服务
sudo systemctl restart sshd
最后给ROOT用户设置密码即可
sudo passwd root