SSH PuTTy error Unable to open address shell

泄露秘密 提交于 2020-05-14 10:12:12

问题


I run the command "gcloud alpha cloud-shell ssh" on google cloud sdk shell in window 7 32bit.But I always get errors

What do I need to do or have something I can do to fix it please help me


回答1:


It looks like a problem with putty.exe on Windows. The Windows version of putty does not like the command line options that gcloud is generating.

To get around this type this command:

gcloud alpha cloud-shell ssh --dry-run

This will print the command line to run putty.exe. It looks like this:

'C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\sdk\putty.exe' -t -P 6000 -i 'C:\Users\username\.ssh\google_compute_engine.ppk' username@devshell-vm-12345678-1234-4992-8505-01234567890ab.cloudshell.dev 'DEVSHELL_PROJECT_ID=development-12345 bash -l'

Copy that command line and replace single quotes with double quotes and delete the part that ends with 'DEVSHELL_PROJECT_ID=development-12345 bash -l' as this is the part causing a problem on Windows.

Example:

"C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin\sdk\putty.exe" -t -P 6000 -i "C:\Users\username\.ssh\google_compute_engine.ppk" username@devshell-vm-12345678-1234-4992-8505-01234567890ab.cloudshell.dev

Second Method:

You can also start putty.exe manually and then fill in the options in the GUI.

The SSH port is 6000

The example above shows you the putty ssh private key:

C:\Users\username\.ssh\google_compute_engine.ppk

The example above shows you the hostname:

devshell-vm-12345678-1234-4992-8505-01234567890ab.cloudshell.dev


来源:https://stackoverflow.com/questions/60908083/ssh-putty-error-unable-to-open-address-shell

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!