sshfs-win-manager icon indicating copy to clipboard operation
sshfs-win-manager copied to clipboard

Feature Request - Add options for tunneled connections / JumpHost / ProxyJump

Open hofingermarkus opened this issue 4 years ago • 7 comments

Hi, great GUI Frontend for SSHFS-Win!

When working with remote servers one, often has to connect through SSH Gateway servers in order to get to the desired machine. On linux one can easily setup such connections via the ProxyJump setting in the .ssh/config file and use the setting directly with sshfs. On Windows the situation is still more tricky to setup, however I see how your tool could help to provide an easy way for users to do it. As the default OpenSSH version (<8.x) on Win10 has a broken ProxyJump command, it might be safest to provide an alternative 2 step approach via your GUI. 1.st making an SSH tunnel through the gateway server (G) to the desired server (D) (This would be the new part) 2.nd connect to the desired server (D) via the forwarded port

So if you could provide an option to build a tunnel before establishing the connection, this would really help to lower the entry burden. :)

hofingermarkus avatar Feb 12 '21 11:02 hofingermarkus

Here are a few more details:

What currently works: 1.) Setting up a tunnel with ssh on windows incl. public key: This bridges the port 22 from the desired target server, via the gateway server to your local machine 127.0.0.1:122 (on port 122)

ssh -L 127.0.0.1:122:DESIRED_SERVER_IP:22 USER@GATEWAY_SERVER_IP -i C:/Users/USER_FOLDER/.ssh/id_rsa

This also works with a C:\Users\USER\.ssh\config file

Host GatewayTunnel
    User GATEWAY_USERNAME
    HostName GATEWAY_IP_ADDRESS
    IdentityFile  C:/Users/WINDOWS_USERNAME/.ssh/id_rsa
    
    #Build a tunnel for the SSH por (22) so that it can be reached from windows directly
    LocalForward 127.0.0.1:122 DESIRED_SERVER_IP:22

(Tested with OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2, Windows Insider build)

2.) Now connect to that temporary port 122 on your local machine with SSHFS-Win using your GUI as a frontend SSHFS-WInmanager_feature_request

As said, it would be cool if you could integrate that into your GUI frontend. Either by doing the above 2step approach, or even better - by using the ProxyJump setting of ssh. However, this setting is known to be broken on OpenSSH on Windows for versions < 8.x

hofingermarkus avatar Feb 12 '21 11:02 hofingermarkus

Came to ask for proxies please

Just to add that this seems to work as a single step on OpenSSH_for_Windows_7.7p1, LibreSSL 2.6.5

ProxyCommand C:\Windows\System32\OpenSSH\ssh.exe -W %h:%p

What would be ideal, for me, is if the gui can pickup anything in the config files without having to keep double entries Also that my config has Include conf.d/* (numerous config files in that location)

beardedfool avatar Mar 02 '21 18:03 beardedfool

I'll be working on this this weekend.

evsar3 avatar Mar 02 '21 18:03 evsar3

+1 for this issue

new2f7 avatar Jun 13 '21 07:06 new2f7

Sorry guys... too much stuff on my job... I'll try to make this as soon as possible.

evsar3 avatar Jun 14 '21 14:06 evsar3

Any change you start working on this feature again?

JBlond avatar Jan 09 '22 20:01 JBlond

Also very interested in such a feature, so I can keep track.

dnelson86 avatar Apr 20 '22 12:04 dnelson86