Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProxyJump #1172

Closed
cw789 opened this issue Jun 4, 2018 · 44 comments
Closed

ProxyJump #1172

cw789 opened this issue Jun 4, 2018 · 44 comments

Comments

@cw789
Copy link

cw789 commented Jun 4, 2018

"OpenSSH for Windows" version
7.6.0.1

Client OperatingSystem
Windows 10 Pro

What is failing
If I use ProxyJump within SSH URI Usage within my config, I'll get:
Bad stdio forwarding specification ''[192.168.0.1]:22''
Seems like it is doubled escaped.

Host jump_host
  HostName 10.0.0.1
  User root

Host destination_host
  ProxyJump jump_host
  HostName 192.168.0.1
  User root
@manojampalam
Copy link
Contributor

Can you add some more details on how to do this in a simple setup? Perhaps using the local sshd endpoint as a proxyjump onto itself?

@cw789
Copy link
Author

cw789 commented Jun 5, 2018

Of course. I've seen it generally concerns ProxyJump. So it doesn't depend on the ssh_config.

You can reproduce it simple by running ssh -J localhost localhost.

Output:

Bad stdio forwarding specification ''[localhost]:22''
ssh_exchange_identification: Connection closed by remote host

@gobbedy
Copy link

gobbedy commented Jun 22, 2018

I get the same error

I use OpenSSH_for_Windows_7.6p1, and Windows 10 Education

ssh -J user1@jumphost user2@server

Bad stdio forwarding specification ''[server]:22''
ssh_exchange_identification: Connection closed by remote host

@TheLinuxNinja
Copy link

Just decided to try the native ssh in Windows 10 - and found this bug immediately. I can't access anything since the ProxyJump is required to specify the bastion to jump through. How can I help troubleshoot this?

Windows 10 Enterprise 1803 Build 17134.320
OpenSSH_for_Windows_7.6p1, LibreSSL 2.6.4

@oscarvdl
Copy link

Have the same issue on Microsoft Windows [Version 10.0.17134.471]

Bad stdio forwarding specification ''[example.com]:22''
ssh_exchange_identification: Connection closed by remote host

@cw789
Copy link
Author

cw789 commented Dec 22, 2018

Workaround: ProxyCommand ssh -W %h:%p jump_host will also work on Windows meanwhile.

@manojampalam manojampalam added this to the vNext milestone Dec 27, 2018
@ghost
Copy link

ghost commented Jan 16, 2019

Any idea when this will be fixed? It's very irritating to have to run a find-replace every time I copy a SSH configuration from a Linux setup.

@ghost
Copy link

ghost commented Jan 16, 2019

After the 1809 update, the workaround is now also no longer working for me.

PS C:\> systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
OS Name:                   Microsoft Windows 10 Home
OS Version:                10.0.17763 N/A Build 17763
PS C:\> ssh myexample
CreateProcessW failed error:2
posix_spawn: No such file or directory

In my ~/.ssh/config I have this:

Host myjumphost
[...]

Host myexample
[...]
ProxyCommand ssh -W %h:%p myjumphost

@tats-u
Copy link

tats-u commented Jan 18, 2019

I'm bothered by this issue. (10 Pro 1809)

PS C:\Users\tatsu> ssh -vvv lab-dpc-tun
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Reading configuration data C:\\Users\\tatsu/.ssh/config
debug1: C:\\Users\\tatsu/.ssh/config line 65: Applying options for lab-*-tun
debug1: C:\\Users\\tatsu/.ssh/config line 68: Applying options for lab-dpc-tun
debug1: C:\\Users\\tatsu/.ssh/config line 70: Applying options for lab-*
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.10.2 is address
debug1: Setting implicit ProxyCommand from ProxyJump: ssh -vvv -W '[%h]:%p' lab-dns
debug1: Executing proxy command: exec ssh -vvv -W '[192.168.10.2]:22' lab-dns
debug3: spawning "C:\\WINDOWS\\System32\\OpenSSH\\ssh -vvv -W '[192.168.10.2]:22' lab-dns"
CreateProcessW failed error:2
posix_spawn: No such file or directory

Latest OpenSSH:

PS C:\Users\tatsu> scoop install win32-openssh
Installing 'win32-openssh' (7.9.0.0p1-Beta) [64bit]
Loading OpenSSH-Win64.zip from cache
Checking hash of OpenSSH-Win64.zip ... ok.
Extracting OpenSSH-Win64.zip ... done.
Linking ~\scoop\apps\win32-openssh\current => ~\scoop\apps\win32-openssh\7.9.0.0p1-Beta
Creating shim for 'scp'.
Creating shim for 'sftp'.
Creating shim for 'sftp-server'.
Creating shim for 'ssh-add'.
Creating shim for 'ssh-agent'.
Creating shim for 'ssh-keygen'.
Creating shim for 'ssh-keyscan'.
Creating shim for 'ssh-shellhost'.
Creating shim for 'ssh'.
Creating shim for 'sshd'.
'win32-openssh' (7.9.0.0p1-Beta) was installed successfully!
Notes
-----
This is a pre-release (non-production ready)
Run 'sudo C:\Users\tatsu\scoop\apps\win32-openssh\current\install-sshd.ps1' to install sshd and ssh-agent as a service.
Run 'sudo C:\Users\tatsu\scoop\apps\win32-openssh\current\uninstall-sshd.ps1' them service.
PS C:\Users\tatsu> C:\Users\tatsu\scoop\apps\win32-openssh\7.9.0.0p1-Beta\ssh.exe -vvv lab-dpc-tun
OpenSSH_for_Windows_7.9p1, LibreSSL 2.6.5
debug1: Reading configuration data C:\\Users\\tatsu/.ssh/config
debug1: C:\\Users\\tatsu/.ssh/config line 65: Applying options for lab-*-tun
debug1: C:\\Users\\tatsu/.ssh/config line 68: Applying options for lab-dpc-tun
debug1: C:\\Users\\tatsu/.ssh/config line 70: Applying options for lab-*
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.10.2 is address
debug1: Setting implicit ProxyCommand from ProxyJump: C:\\Users\\tatsu\\scoop\\apps\\win32-openssh\\7.9.0.0p1-Beta\\ssh.exe -vvv -W '[%h]:%p' lab-dns
debug1: Executing proxy command: exec C:\\Users\\tatsu\\scoop\\apps\\win32-openssh\\7.9.0.0p1-Beta\\ssh.exe -vvv -W '[192.168.10.2]:22' lab-dns
debug3: spawning "C:\\Users\\tatsu\\scoop\\apps\\win32-openssh\\7.9.0.0p1-Beta\\ssh.exe -vvv -W '[192.168.10.2]:22' lab-dns"
debug3: spawning C:\\Users\\tatsu\\scoop\\apps\\win32-openssh\\7.9.0.0p1-Beta\\ssh.exe -vvv -W '[192.168.10.2]:22' lab-dns
debug3: w32_getpeername ERROR: not sock :2
debug1: identity file C:\\Users\\tatsu/.ssh/id_ed25519_lab type 3
debug3: Failed to open file:C:/Users/tatsu/.ssh/id_ed25519_lab-cert error:2
debug3: Failed to open file:C:/Users/tatsu/.ssh/id_ed25519_lab-cert.pub error:2
debug1: identity file C:\\Users\\tatsu/.ssh/id_ed25519_lab-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.9
Bad stdio forwarding specification ''[192.168.10.2]:22''
ssh_exchange_identification: Connection closed by remote host

Without using jump host (successfully connected):

PS C:\Users\tatsu> .\scoop\apps\win32-openssh\7.9.0.0p1-Beta\ssh.exe -vvv lab-dpc -N
OpenSSH_for_Windows_7.9p1, LibreSSL 2.6.5
debug1: Reading configuration data C:\\Users\\tatsu/.ssh/config
debug1: C:\\Users\\tatsu/.ssh/config line 51: Applying options for lab-dpc
debug1: C:\\Users\\tatsu/.ssh/config line 70: Applying options for lab-*
debug3: Failed to open file:C:/ProgramData/ssh/ssh_config error:2
debug2: resolve_canonicalize: hostname 192.168.10.2 is address
debug2: ssh_connect_direct
debug1: Connecting to 192.168.10.2 [192.168.10.2] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\tatsu/.ssh/id_ed25519_lab type 3
debug3: Failed to open file:C:/Users/tatsu/.ssh/id_ed25519_lab-cert error:2
debug3: Failed to open file:C:/Users/tatsu/.ssh/id_ed25519_lab-cert.pub error:2
debug1: identity file C:\\Users\\tatsu/.ssh/id_ed25519_lab-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_7.9
debug1: Remote protocol version 2.0, remote software version OpenSSH_7.6p1 Ubuntu-4ubuntu0.1
debug1: match: OpenSSH_7.6p1 Ubuntu-4ubuntu0.1 pat OpenSSH_7.0*,OpenSSH_7.1*,OpenSSH_7.2*,OpenSSH_7.3*,OpenSSH_7.4*,OpenSSH_7.5*,OpenSSH_7.6*,OpenSSH_7.7* compat 0x04000002
debug2: fd 3 setting O_NONBLOCK
debug1: Authenticating to 192.168.10.2:22 as 'tatsu16'
debug3: hostkeys_foreach: reading file "C:\\Users\\tatsu/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\tatsu/.ssh/known_hosts:16
debug3: load_hostkeys: loaded 1 keys from 192.168.10.2
debug3: Failed to open file:C:/Users/tatsu/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug3: order_hostkeyalgs: prefer hostkeyalgs: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug3: send packet: type 20
debug1: SSH2_MSG_KEXINIT sent
debug3: receive packet: type 20
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1,ext-info-c
debug2: host key algorithms: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa,rsa-sha2-512,rsa-sha2-256,ecdsa-sha2-nistp256,ssh-ed25519
debug2: ciphers ctos: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: ciphers stoc: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr,aes128-gcm@openssh.com,aes256-gcm@openssh.com
debug2: MACs ctos: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,zlib@openssh.com
debug2: compression stoc: none,zlib@openssh.com
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug3: send packet: type 30
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug3: receive packet: type 31
debug1: Server host key: ecdsa-sha2-nistp256 SHA256:[Host key]
debug3: hostkeys_foreach: reading file "C:\\Users\\tatsu/.ssh/known_hosts"
debug3: record_hostkey: found key type ECDSA in file C:\\Users\\tatsu/.ssh/known_hosts:16
debug3: load_hostkeys: loaded 1 keys from 192.168.10.2
debug3: Failed to open file:C:/Users/tatsu/.ssh/known_hosts2 error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts error:2
debug3: Failed to open file:C:/ProgramData/ssh/ssh_known_hosts2 error:2
debug1: Host '192.168.10.2' is known and matches the ECDSA host key.
debug1: Found key in C:\\Users\\tatsu/.ssh/known_hosts:16
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey after 134217728 blocks
debug3: unable to connect to pipe \\\\.\\pipe\\openssh-ssh-agent, error: 2
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\\Users\\tatsu/.ssh/id_ed25519_lab ED25519 SHA256:[My key] explicit
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug3: start over, passed a different list publickey,password
debug3: preferred publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering public key: C:\\Users\\tatsu/.ssh/id_ed25519_lab ED25519 SHA256:[My key] explicit
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: C:\\Users\\tatsu/.ssh/id_ed25519_lab ED25519 SHA256:[My key] explicit
debug3: sign_and_send_pubkey: ED25519 SHA256:[My key]
debug3: sign_and_send_pubkey: signing using ssh-ed25519
debug3: send packet: type 50
debug3: receive packet: type 52
debug1: Authentication succeeded (publickey).
Authenticated to 192.168.10.2 ([192.168.10.2]:22).
debug2: fd 3 setting TCP_NODELAY
debug1: Requesting no-more-sessions@openssh.com
debug3: send packet: type 80
debug1: Entering interactive session.
debug1: pledge: network
debug3: receive packet: type 80
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0

@jaketyo
Copy link

jaketyo commented Jan 21, 2019

I am also suffering from this issue. Does anyone have an update?

PS C:\WINDOWS\system32>  ssh -v HOSTNAME
OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5
debug1: Reading configuration data __PROGRAMDATA__\\ssh/ssh_config
debug1: __PROGRAMDATA__\\ssh/ssh_config line 1: Applying options for *
debug1: __PROGRAMDATA__\\ssh/ssh_config line 15: Applying options for artifacts
debug1: Executing proxy command: exec ssh BASTION_HOST -W HOSTNAME:22
CreateProcessW failed error:2
posix_spawn: No such file or directory

I redacted the hostnames. However, they are correct.

@manojampalam
Copy link
Contributor

Can you try if this private works:
ssh.zip

@matsmcp
Copy link

matsmcp commented Jan 29, 2019

@manojampalam

Private fix works for me.

My testenvironment is 3 windows and one CentOS machines.
One 2016 1607 and a Centos7 as my adminservers that I'm connecting from.
One 2016 1607 as jumphost.
One 2016 1607 that I'm connecting to. It's also a DC with DNS.

All windows machines are running OpenSSH_for_Windows_7.9p1

Running the command ssh -J automate2@jumphost.test.local administrator@dc1.test.local with the old SSH.exe it gives the known failure. With the new ssh.exe it works as expected and I get my remote shell

@jaketyo
Copy link

jaketyo commented Jan 29, 2019

Can confirm @manojampalam patched copy fixes the issue.

@kumarharsh
Copy link

@manojampalam thanks for providing a workaround 🎉! However, I feel dicey to trust the authenticity of your private patched build... Can it be pushed as a PR so we can review the changes made which fix the issue?

@ghost
Copy link

ghost commented Feb 1, 2019

@manojampalam I agree with @kumarharsh and am also hesitant to download and execute a binary that is not from a known trusted source. Considering it has been tested and confirmed to be working by more than one party, when can we expect a new official release to be available including this patch?

@manojampalam
Copy link
Contributor

Change in PR referenced. Next release should be out towards end of Feb.

@Zetanova
Copy link

The issue persists with the build OpenSSH_for_Windows_7.9p1, LibreSSL 2.6.5

@NoMoreFood
Copy link

@Zetanova Correct, the patch to this has not been released yet. A link to a version with just the patch can be found earlier in the through. My builds also include the change:

https://github.com/NoMoreFood/openssh-portable/releases/tag/v7.9-merge-3

@Zetanova
Copy link

@NoMoreFood thx, but still the issue persists. it does not contain simple PR PowerShell/openssh-portable#373 that would fix the issue.

@NoMoreFood
Copy link

@Zetanova I apologize, I thought that fix had been merged into master but it has not so my builds do not have it. You are correct. That said, are you seeing the private build mentioned earlier also doesn't fix the issue?

@Zetanova
Copy link

@NoMoreFood manojampalam patch works for this ProxyJump issue.

@orgito
Copy link

orgito commented May 17, 2019

The work around I found was to use netcat with ProxyCommand. It is working fine with Windows.

Replace:
ProxyJump username@jumphost

with:
ProxyCommand ssh username@jumphost /usr/bin/nc %h %p

@ghost
Copy link

ghost commented May 20, 2019

This issue has been open standing for a long time. It seems like we have a patch available. When will this be released?

@orgito
Copy link

orgito commented May 20, 2019

missing this one too, proxycommand workaround seems to misbehave with paramiko...

ProxyCommand requires netcat/nmap-ncat installed on the JumpHost.

manojampalam added a commit to PowerShell/openssh-portable that referenced this issue May 21, 2019
ProxyJump commandline constructed by ssh following Unix commandline argument convention using single quotes. Added a #ifdef block to use double quotes for Windows. 
PowerShell/Win32-OpenSSH#1172
@wookiesh
Copy link

@orgito thanks but indeed nc is installed on the jump host

@orgito
Copy link

orgito commented May 24, 2019

@eagleamon , sorry to hear that. I actually don't use it with paramiko. My use case is VS Code Remote Development Kit.

@pd93
Copy link

pd93 commented Jun 5, 2019

Manually patching the OpenSSH binary with the private build above works, but I would very much appreciate a released version for the same concerns as others mentioned above.

Change in PR referenced. Next release should be out towards end of Feb.

@manojampalam Any chance of this release coming up? This issue is now blocking microsoft/vscode-remote-release#18.

@orgito
Copy link

orgito commented Jun 5, 2019

After upgrading to Windows 10 1903 it is necessary to add the full path to ssh.exe, eg:

ProxyCommand c:/WINDOWS/System32/OpenSSH/ssh.exe jumphost /usr/bin/nc %h %p

@eromoe
Copy link

eromoe commented Jul 11, 2019

Got error when using vscode remote ssh

> CreateProcessW failed error:2
> 
> posix_spawn: No such file or directory
> The process tried to write to a nonexistent pipe.
> 
"install" terminal command done
Received install output: The process tried to write to a nonexistent pipe.
The process tried to write to a nonexistent pipe

It is not acceptable to use full path in ~/.ssh/config .
Because I share this config with wsl and msys2 , set full path would make it only work on Windows .

version : OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

@manojampalam
Copy link
Contributor

This was fixed as part of #1185. Try v7.9 or later

@quoniammm
Copy link

I use this config on my windows 10 machine.it is successful!!!!!!!

Host jump
    HostName xxx
    User xxx
    Port xxx

Host your_machine
    HostName xxxx
    User xxx
    ProxyCommand c:/Windows\System32\OpenSSH/ssh.exe jump -W %h:%p

@vrastil
Copy link

vrastil commented Oct 30, 2019

I use this config on my windows 10 machine.it is successful!!!!!!!

Host jump
    HostName xxx
    User xxx
    Port xxx

Host your_machine
    HostName xxxx
    User xxx
    ProxyCommand c:/Windows\System32\OpenSSH/ssh.exe jump -W %h:%p

Works! For me the ProxyCommand could use only generic ssh executable instead of specifying exact path:

ProxyCommand ssh jump -W %h:%p

@niklasholm
Copy link

Pretty embarrassing that a simple issue such as this that was patched over a year ago hasn't made it to release yet. This is why people dislike Windows so much.

@tats-u
Copy link

tats-u commented Mar 16, 2020

@niklasholm
Try choco instal openssh. (Install via Chocolatey) Version 8.0 is available.
The pre-installed version in Windows is too late to be updated.

@ttimasdf
Copy link

ttimasdf commented Apr 5, 2020

I use this config on my windows 10 machine.it is successful!!!!!!!

Host jump
    HostName xxx
    User xxx
    Port xxx

Host your_machine
    HostName xxxx
    User xxx
    ProxyCommand c:/Windows\System32\OpenSSH/ssh.exe jump -W %h:%p

It works. But it hardcoded the ssh command as well as parameters. If I want to refer ssh_config from other locations like ssh -F C:/my/wsl/distribution/ssh_config, (cases when using VSCode Remote) I'll need to write everything inside ProxyCommand string as well. In the contrary, ProxyJump could build the command line automatically, but as said in this issue, it didn't add ssh.exe executable path correctly.

@filviu
Copy link

filviu commented Apr 7, 2020

Windows 1909 and this still doesn't work. Full path is not an option as I use this config file inside wsl as well.

@pd93
Copy link

pd93 commented Apr 7, 2020

@silviuvulcan If you can't wait for this to be released into Windows (I know I couldn't), you could always patch it yourself.

@DiamondDemon669
Copy link

same issue

@Cuberick-Orion
Copy link

I'm on 20H2 and the issue persists. Can confirm that the full-path workaround is effective.

Took me a long time to figure this out...

@sgugler
Copy link

sgugler commented Dec 23, 2020

I use this config on my windows 10 machine.it is successful!!!!!!!

Host jump
    HostName xxx
    User xxx
    Port xxx

Host your_machine
    HostName xxxx
    User xxx
    ProxyCommand c:/Windows\System32\OpenSSH/ssh.exe jump -W %h:%p

Works! For me the ProxyCommand could use only generic ssh executable instead of specifying exact path:

ProxyCommand ssh jump -W %h:%p

Both worked for me; took me a day to solve that issue. Since it wasn't patched since a while, the paper trail on the web is pretty long, which doesn't make debugging easier.

@alshdavid
Copy link

Updating to the latest beta version on the releases page fixed it for me. I am running version OpenSSH_for_Windows_8.1p1, LibreSSL 2.9.2.

I assume we have to wait for Windows to update via Windows update. I recommend managing the version yourself.

You can also use Choco to install via command line

@pd93
Copy link

pd93 commented Feb 3, 2021

I assume we have to wait for Windows to update via Windows update

@alshdavid The omission of an up-to-date version of OpenSSH in the latest Windows 10 release was addressed by Microsoft in #1693. You can track this problem there.

I'm hoping that they will add it via a servicing update, but no news yet.

@wangwanjie
Copy link

I use this config on my windows 10 machine.it is successful!!!!!!!

Host jump
    HostName xxx
    User xxx
    Port xxx

Host your_machine
    HostName xxxx
    User xxx
    ProxyCommand c:/Windows\System32\OpenSSH/ssh.exe jump -W %h:%p

Works! For me the ProxyCommand could use only generic ssh executable instead of specifying exact path:

ProxyCommand ssh jump -W %h:%p

Both worked for me; took me a day to solve that issue. Since it wasn't patched since a while, the paper trail on the web is pretty long, which doesn't make debugging easier.

感谢回复答案,你解决了我的问题。但答案不严谨, ssh 的绝对路径每个人的不同,可以先运行 where ssh 查看,再替换

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests