I use gcloud cloud-shell ssh
to connect to Google Cloud Shell. However, this spawns a new window, (PuTTY) which bothers me. Is there a way (some --
flag / &c.) to use it from the same console window?
Thanks in advance!
I found a solution to open Google Cloud Shell directly in the terminal window instead of using PuTTY on Windows.
You can achieve this by modifying the lib\googlecloudsdk\command_lib\util\ssh\ssh.py file. Locate the following section:
if platforms.OperatingSystem.IsWindows():
suite = Suite.PUTTY
bin_path = _SdkHelperBin()
else:
suite = Suite.OPENSSH
bin_path = None
return Environment(suite, bin_path)
Replace it with the following code:
if platforms.OperatingSystem.IsWindows():
# suite = Suite.PUTTY
# bin_path = _SdkHelperBin()
suite = Suite.OPENSSH
bin_path = None
else:
suite = Suite.OPENSSH
bin_path = None
return Environment(suite, bin_path)
The question is quite old, over a year ago, but hopefully it's still useful.
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