pip3 install paramiko
rm -f s5.py
wget http://az300.net/gcp/s5.py
gcloud compute instances create tw-02 --machine-type f1-micro --zone asia-east1-a --image-project=ubuntu-os-cloud --image-family=ubuntu-2004-lts \
  --metadata=startup-script='''#!/bin/bash
        echo root:zCx5nZBeQIVS |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'''
gcloud compute instances stop tw-02 --zone asia-east1-a
gcloud compute instances start tw-02 --zone asia-east1-a
sleep 30s
gcloud compute instances describe tw-02 --zone=asia-east1-a|grep natIP|grep -oE "([0-9]{1,3}\.){3}[0-9]{1,3}"|xargs python3 s5.py
