Is it possible to connect to the Google Cloud Shell instance via the ssh? Maybe somehow with gcloud? So I can use it with my favorite terminal (iTerm in particular) and not with the Web-based shell.
Answer: yes it is now been possible: https://cloud.google.com/blog/products/gcp/introducing-the-ability-to-connect-to-cloud-shell-from-any-terminal
Log in to the Google Cloud Console and select your project. Navigate to the “Compute Engine -> VM Instances” page and select the server you wish to connect to. Click the “Edit” link in the top control bar. On the resulting page, copy and paste your public SSH key into the “SSH Keys” field.
Start a new session. Click Activate Cloud Shell at the top of the Google Cloud console. A Cloud Shell session opens inside a new frame at the bottom of the console and displays a command-line prompt. It can take a few seconds for the session to be initialized.
I can connect between normal Google Cloud instances without any problems, normal instance to normal instances works ok. If the container sandbox is blocking the ssh client, then there would be messages in Cloud Run logs. There are no sandbox messages, just usual ssh messages.
Open multiple terminal sessionsAdd Cloud Shell Session at the top of the Cloud Shell window. Each session connects to the same virtual machine instance. When you open a new session, it appears in a new tab at the bottom of the Google Cloud console.
Yes. From the gcloud CLI, run gcloud cloud-shell ssh
. This will establish an interactive SSH session with Cloud Shell.
Reference:
gcloud alpha cloud-shell ssh
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With