LoginSignup
12
11

More than 5 years have passed since last update.

GCEのインスタンスにssh接続できない時の対策

Posted at
$ gcloud compute instances list
instance-name

で、みると一覧にはあるけど

$ gcloud compute ssh instance-name
ERROR: (gcloud.compute.ssh) Could not fetch instance:
 - The resource 'instance-path' was not found

で、なぜかつながらない時の対策


$ gcloud compute --project "project-name" ssh --zone "zone-name" "instance-name"

これでつながる。

Google Developer Console → 対象プロジェクト → (右側メニューの)コンピュート → Compute Engine → VMインスタンス → 対象インスタンスの 接続 ssh 右側のメニュー → gcloudコマンドを表示
からコピペしてきてもOK

12
11
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
12
11