I am trying to use OpenSSH ProxyCommand on Windows to connect to device2 through device1. Device2 requests xxxxx port forwarding and connection without ProxyCommand works fine (but requires first connecting to device1 and then device2, and I want easy, one step connection).
I've created C:\Program Files\OpenSSH\etc\ssh_config file
Host device1 Hostname xxx.xxx.xx.xx User root Host device2 ProxyCommand ssh -q device1 nc -q0 localhost xxxxx
Now when I type
/bin/sh: No such file or directory write: Broken pipe
I have checked this on Linux OS and it worked just fine. Could you please explain what might me wrong?
Additionally I've also tried creating config in C:\Program Files\OpenSSH\home\user\.ssh\config and got the same result.
When I delete config file then I get
ssh: Could not resolve hostname device2: Name or service not known
So the file seems to be detected.
I am using OpenSSH_7.6p1, OpenSSL 1.0.2k 26 Jan 2017, and Windows 10