-
Notifications
You must be signed in to change notification settings - Fork 310
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
Can't connect through jumpbox #18
Comments
I'm able to connect to a JumpHost endpoint. Mine are configured in my config file. The only thing I had to do was copy my SSH key to the remote endpoint (and jump hosts). For example, if my config was: |
I am able to do the same, but what I found was that I could do the following: local -> server = OK I do know that when VSC connects to the remote server, it attempts to install or run a service. My suspicion is that by jumping through from X to Y to Z, the service ends up installing on Y and not X. Perhaps maybe there’s a better way to pivot using JumpHost as you said rather than ProxyCommand. I’ll give ProxyJump a shot. |
@TheStoof for what it's worth, here's an excerpt from my config file (sanitized):
|
@TheStoof I just attempted the same connection, but from a Windows 10 machine with WSL, and it didn't work (same problem as #34). It did work though from my Mac. |
Yea, tried various options and nothing succesful to far. I was able to connect once by creating a tunnel in WSL and pointing the Hostname and Port to the tunnel but wasn't able to repeat. |
Ran into this issue while trialing Remote SSH as an alternative to local development. Connecting from a Windows 10 machine to a remote box works, but only when connecting directly. We cannot connect to any hosts via a jumpbox. In other words:
Here's my (sanitized) config:
There is no way for us to SSH into a remote machine without tunneling through a jumpbox, so this functionality it absolutely necessary for us to use Remote - SSH. |
I'm trying to solve this issue by writing a new |
Anyone solve this issue? |
I decided to try SSHing (with the same config as above) to my remote boxes via Powershell today. This should use the same version of SSH as the Remote - SSH extension (rather than the WSL version of SSH). Unsurprisingly, I got exactly the same result, but a better error message
A bit more searching also found PowerShell/Win32-OpenSSH#1172. This issue seems more relevant than 1185, but is still open 😢 |
I have copyed my SSH key to the remote endpoint and jump hosts as @tralston suggested. But I still met the issue like @pd93 . I added more information. My config:
On Git Bash(windows)
On Powershell:
On VS Code:
|
Maybe this could help:
It worked as expected on Windows 10 1809 but there is probably bug in 1903 and this worked for me. |
Seeing same problem here when trying to connect to Centos 7 via a Centos 7 jump box from a mac. Tried several forms of ProxyCommand and ProxyJump. Can connect thru proxy to target from command line so the configuration should be good. Keys are set up on both jump box and target box. Code Version: 1.35.0 |
I encountered @johnymachine I tried yours, but I got OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5 |
Sorry my bad, I probably copied bad command. My config is exactly this and it works: |
|
@johnymachine Thanks for the solution! Do you know how to how to run the proxy ssh process in the background? There's a blank ssh process window that stays open as long as the connection is active. |
Well 😀 Here Is my question on stackoverflow: No luck so far... |
Thought I'd post a little update to this issue for those who run into it. The root cause of this issue is a bug with OpenSSH for windows. However, this has now been patched in the latest release Updates:
Manual Fix
If you get a permissions error then this may be because there is system protection in place on the existing
|
If I turn off "Use Local Server" it gets further and installs the server and starts it, and I can see it running as node on the remote system, however, it just hangs here and never connects. If I turn off "Use Local Server" it doesn't get past the remote port parsing again.
|
@JustinGrote I honestly don't know about your scenario - could you open a new issue with the full log, and some more details about what you're doing? |
@roblourens I just found my problem is #25, I'll continue it there. Doesn't appear to have anything to do with the port forwarding specifically, just coincidence. |
@JustinGrote , @roblourens - If it's a OpenSSH issue then please create an issue here |
Please provide the detailed repro steps isolating the vscode environment (Just using ssh client and sshd server). |
@bagajjal My Particular Issue apparently unrelated to this issue is opened as #2475. According to @roblourens it's been fixed downstream and will be in next release, so further discussion of my issue should go there :) |
I got it working by also sending my ssh key to the proxy.
|
Below command is working
|
if |
For me worked the following: [on Win10, w/ w/o WSL]
As for my ssh-key login:
And I needed to copy my keys with |
I patched windows 10 before.
Is this a new but or not ? |
@eromoe Unfortunately, that's still version 7.7 which does not contain the fix. You'll need to manually update to v8.0+ or use one of the other workarounds mentioned above. It has been confirmed in another issue that v8.1 will be released in an update later this year, but is not included in Windows 10 2004 (20H1):
|
@anji993 Patching does sovle my problem , may be something wrong with previllage ? |
It worked for me :) |
FWIW: For anyone wanting password authentication only, this config works on Linux for jump-hosts:
|
Have anyone seen #3857 that with jump server too? |
A quick update for anyone following this issue. MSFT currently have a pinned issue explaining why OpenSSH was not included in the 20H2 release. I've updated my workaround comment above to reflect this. |
The manual fix by @pd93 worked like a charm for me, but a Windows update seems to have overwritten the updated ssh.exe. Rather than potentially having to replace the executable after future updates I simply extracted the zip to a different location and added it to the systems PATH. My steps:
Note that I had to edit PATH for the whole system, not my user. In the latter case the entry will be added after the system version giving it precedence. Beware that sometime in the future this solution could cause problems if the system OpenSSH version is updated to a more recent version than the manually installed one... |
Worked without any issues. I've used MobaXterm for a long time to first setup the tunnel and then just connect to the destination, but now it's not needed anymore with |
life saving!!! I had to log in to appreciate your share! Got mine solved! thanks! |
@roblourens I believe this can be closed now. This was never a VSCode issue and it should now be resolved anyway as a newer (and working) version of OpenSSH is now included in the latest version of Windows. Anyone on older versions of Windows (and therefore OpenSSH) can follow the manual steps I outlined earlier in this issue in order to update. |
Thanks for pointing that out @pd93 |
Some users may leverage ~/.ssh/config to set up ProxyJump and ProxyCommands to get to their endpoints. Currently, it appears that VSCode Remote only supports a direct connection.
The text was updated successfully, but these errors were encountered: