通过网页端登录Google Cloud
切换到root用户
sudo su
修改root密码
passwd
# Changing password for user root.
# New password:新密码
# Retype new password:重新录入新密码
# passwd: all authentication tokens updated successfully.
修改ssh配置
Google Cloud默认是不允许用ssh远程登录
vim /etc/ssh/sshd_config
按如下规则修改配置
PermitRootLogin yes # 默认为: PermitRootLogin no
PasswordAuthentication yes #默认为: PasswordAuthentication no
重启ssh服务
service sshd restart
使用ssh等第三方工具登录Google Cloud
ssh root@ip_address