谷歌云怎么拿密码开机
2块钱GCP=150刀
============================
===========正文开始============
============================
如果VNC上不去 用自动化程序开机 让他自动改好密码
英文页面下
Compute Engine==>VM instances==>Create an instance
在开机选项里面的
Advanced options
Networking, disks, security, management, sole-tenancy
里面
打开有个
Management
Description, deletion protection, reservations, and automation
下面有个
Automation
输入(中间没有空行 应该是一行挨着一行)
#!/bin/bash
echo root:Abcd65465435 |sudo chpasswd root
sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config;
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config;
sudo service sshd restart
开机后密码就是
Abcd65465435
记得去谷歌云防火墙那边开防火墙,不然端口不会打开