demotomohiro / remocolab

remocolab is a Python module to allow remote access to Google Colaboratory using SSH or TurboVNC.
MIT License
316 stars 229 forks source link

CreateProcessW failed error:2 #85

Open sasagr opened 3 years ago

sasagr commented 3 years ago

Describe the bug C:\Users\sasasa>ssh -o UserKnownHostsFile=/dev/null -o VisualHostKey=yes -oProxyCommand="cloudflared access ssh --hostname %h" -L 5901:localhost:5901 colab@discovery-writer-harm-leaving.trycloudflare.com CreateProcessW failed error:2 posix_spawn: No such file or directory

Desktop (please complete the following information):

demotomohiro commented 3 years ago

That error looks like SSH tried to run cloudflared but failed. Did you download cloudflared and put it in a directory your PATH environment variable points? If you installed cloudflared correctly, running cloudflared --help on console prints help message.

sasagr commented 3 years ago

I m not sure I m understanding your point about PATH environment but that's what I did. I downloaded the cloudfared.exe file. I created a config file in .ssh directory with the following text (with the path location of my cloudfare file): Host *.trycloudflare.com HostName %h User root Port 22 ProxyCommand access ssh --hostname %h

I did this following an other tutorial about Argo Tunnel. Your ssh command line seems to work fine if I omit the -oProxyCommand="cloudflared access ssh --hostname %h" part. Pls guide me to fix it in order to run your command correctly

demotomohiro commented 3 years ago

You will find many web sites that explains what is PATH environment variable and how to set it by googling with "PATH environment variable windows". remocolab prints ssh command with all ssh options that are required to connect to the server so that you don't need to edit config file. And remocolab suppose your cloudflared.exe is in one of directories PATH environment variable contains. But ssh options can be configured in both config file and command line parameters. You can learn how to use ssh in following pages. https://man.openbsd.org/ssh https://man.openbsd.org/ssh_config

Shuntw6096 commented 3 years ago

Hi, I have the same problem, also use Chrome on Windows 10, but I set PATH, it doesn't work. url

Thanks

demotomohiro commented 3 years ago

It might be a bug of the Windows openSSH. Please try full path to your cloudfared in ProxyCommand option.

https://stackoverflow.com/questions/65059250/ssh-and-scp-failed-with-createprocessw-failed-error2-posix-spawn-no-such-file https://github.com/PowerShell/Win32-OpenSSH/issues/1185

Shuntw6096 commented 3 years ago

It might be a bug of the Windows openSSH. Please try full path to your cloudfared in ProxyCommand option.

https://stackoverflow.com/questions/65059250/ssh-and-scp-failed-with-createprocessw-failed-error2-posix-spawn-no-such-file PowerShell/Win32-OpenSSH#1185

It works, thanks.

lmc19970711 commented 3 years ago

@Shuntw6096 Hello, I have also this problem, but I can not see the solution, can you help me solve. Thank you.