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