目前Google Compute Engine 只能支援用 Web SSH 或者用 SSH Key 的模式登入。如果有需要採用簡單的帳號密碼登入方法,需要修改一下主機設定。
以下以 Ubuntu 作為示範。
先用 Web SSH 登入後修改 root 密碼,並更改身分為 root
sudo passwd root
su
接著用編輯器打開 /etc/ssh/sshd_config
更改內容
PermitRootLogin yes
# ...
PasswordAuthentication yes
# 後面這兩個非必要
GSSAPIAuthentication no
UseDNS no
然後記得重啟 ssh
service ssh restart
應該就能用終端機直接帳號密碼登入了