[GCE] インスタンスにssh接続

インスタンスにsshで接続する。

接続するためのコマンドはDevelopers Consoleの Compute Engine → VM インスタンス で各インスタンスの一番右にある「SSH」というボタンをクリックすると確認できる。

コマンドはこんな感じ。括弧内は自分の環境にあわせる。
gcutil --service_version="v1" --project="(project ID)" ssh  --zone="(zone ID)" "(instance ID)"

こんな感じで接続できたらOK。
WARNING: You don't have an ssh key for Google Compute Engine. Creating one now...
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
INFO: Updated project with new ssh key. It can take some time for the instance to pick up the key.
INFO: Waiting 10 seconds before attempting to connect.
INFO: Running command line: ssh -o UserKnownHostsFile=/dev/null -o CheckHostIP=no -o StrictHostKeyChecking=no -i /home/user/.ssh/google_compute_engine -A -p 22 user@xxx.xxx.xxx.xxx --
Warning: Permanently added 'xxx.xxx.xxx.xxx' (RSA) to the list of known hosts.
[user@tegetege-demo01 ~]$ 


【まとめ】
Google Cloud PlatformのCompute Engine使ってみた

このブログの人気の投稿

zsh 設定 - プロンプト -

テンションを上げたいときにおすすめの曲(StarrySky YEAH! Remix)

OpenLDAP のログ周りの設定をする