VanDyke Software Forums

VanDyke Software Forums (https://forums.vandyke.com/index.php)
-   SecureCRT on the Mac (https://forums.vandyke.com/forumdisplay.php?f=24)
-   -   How to ssh into gcloud with SecureCRT? (https://forums.vandyke.com/showthread.php?t=14544)

SimonHF 05-26-2021 01:37 PM

How to ssh into gcloud with SecureCRT?
 
Hello! I followed these instructions [1] to setup the gcloud tools locally on my Macbook Pro. Then I can ssh into a particular gcloud instance with this command using a non-SecureCRT client:

$ gcloud compute ssh --ssh-flag="-A" --tunnel-through-iap <instance name>

I installed SecureCRT on the same MacBook Pro, and imported the gcloud ssh keys into SecureCRT.

How can I use SecureCRT to ssh into the same gcloud instance? Same command but different somehow? Different way?

Thanks in advance!

[1] https://cloud.google.com/sdk/docs/quickstart#mac

SimonHF 05-26-2021 02:43 PM

Figured it out:

I need to create this tunnel using the gcloud tool:

$ gcloud compute start-iap-tunnel <instance name> 22 --project=<project name> --zone=us-west1-b --verbosity=warning --local-host-port=localhost:3333
Testing if tunnel connection works.
Listening on port [3333].

Then in SecureCRT I connect to localhost:3333 with the right name and cert et voila... :-)

cboyack 05-26-2021 04:07 PM

Hi Simon,

I'm glad that you were able to figure it out!

If you want to try it out, there's an option under the Session Options / Connection category called Pre-connect:.

You may be able to place your $ gcloud compute... command in this field on a per-session basis and point SecureCRT to localhost:3333 so that you don't have to run that command in an external application.

Unfortunately, there's no capability for any substitution variables within that pre-connect command, but I've added this thread to the feature request for said capability. If it does become an option in the future, we'll be sure to post here.

If you prefer direct email notification, send an email to support@vandyke.com and include Feature Request - Forum Thread #14544 in the subject line or use this form from the support page of our website.


All times are GMT -6. The time now is 05:12 PM.