CreateProcessW failed error:2 ssh_askpass: posix_spawn: No such file or directory Host key verification failed, jupyter notebook on remote server

Himanshu Poddar picture Himanshu Poddar · Feb 7, 2020 · Viewed 7.4k times · Source

So I was following a tutorial to connect to my jupyter notebook which is running on my remote server so that I can access it on my local windows machine.

These were the steps that I followed.

On my remote server :

jupyter notebook --no-browser --port=8889

Then on my local machine

ssh -N -f -L localhost:8888:localhost:8889 *******@**********.de.bosch.com

But I am getting an error

CreateProcessW failed error:2
ssh_askpass: posix_spawn: No such file or directory
Host key verification failed.

How do I resolve this? Or is there is any other way to achieve the same?

Answer

Xaser picture Xaser · Mar 27, 2020

According to the openssh docs, the ssh client, which will usually prompt for a password on the command line, will try to show a GUI dialog for the user to enter his password, if SSH_ASKPASS and DISPLAY environment variables are set.

On windows however, this is not properly supported yet, as the needed ssh_askpass binary is missing, and also because this seems still pretty X11 oriented.

Git for windows however seemed to get it working properly.

Of course, if you are just interested in entering your password on the command line, make sure the variables are unset. With the information you provided, it is however impossible to answer why the variable was set in the first place.