- Google Cloud Platform设置centos ssh登录
- 1. 创建centos实例
- 2.切换到root编辑ssh配置文件
- 3. 修改以下内容
- 4. 查看状态
- 5. 重启服务器
- 5.shell登录(mac 终端)
参考这篇文档前半部分到修改密码(文章创建的实例是Ubuntu) 链接
2.切换到root编辑ssh配置文件vim /etc/ssh/sshd_config3. 修改以下内容
PermitRootLogin yes PasswordAuthentication yes4. 查看状态
systemctl status sshd.service5. 重启服务器
systemctl restart sshd.service reboot
点击重试
ssh -p 22 root@[your server ip]
输入yes 用上边修改过的密码即可登录



