首先,使用GCP建立VM: Compute Engine -> VM執行個體

設定server配置:
區域, cpu, memory, 開機磁碟, 選擇作業系統, 防火牆等等。


接著編輯VM,設定固定外部IP:
因每當VM重啟,IP就會變動,因此要設定固定IP。

將外部IP從臨時改為建立IP位址:

接著即產生固定IP。

產生key:
PuTTY Key Generator的Key comment輸入user name。

把public key匯入vm,private key儲存起來。
下圖紅框處貼上public key:

接著即可使用putty ssh登入:
選擇private key來登入

login as:輸入Key comment輸入的user name。

GCP 建立的VM預設無法用root ssh,也無法用輸入帳密的方式ssh。
本筆記參考:
https://www.footmark.info/linux/centos/google-cloud-create-vm-centos7/