SSH through HTTP proxy with Socat got CreateProcessW failed error:2 posix_spawnp: No such file or directory

413 Views Asked by At

I'm trying to establish an SSH connection to my remote host at x.x.x.x from a Windows machine. I'm behind an HTTP proxy which filters only HTTP(S) packages.

The first thing I did was to bind my remote host SSH server to port 443.

If I try to make a simple ssh -p 443 x.x.x.x the connections goes in timeout because it must pass through the HTTP proxy (let's say y.y.y.y)

I cannot use nc/ncat on this pc because they are noticed as malicious, however I'm allowed to use socat.

I already search on the internet and I found this solution: ssh -o ProxyCommand='socat - "PROXY:%h:%p|tcp:y.y.y.y:8080"' x.x.x.x

The problem is I get the error: CreateProcessW failed error:2 posix_spawnp: No such file or directory

I already tried by giving socat the absolute path and the extension as well but I got the same error: ssh -o ProxyCommand='C:/Users/MyUser/Download/socat/socat.exe - "PROXY:%h:%p|tcp:y.y.y.y:8080"' x.x.x.x

Where does the issue come from?

0

There are 0 best solutions below