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

Tunneling

Open Astlaan opened this issue 5 years ago • 6 comments

Is it possible to mount to a remote ssh host, while tunneling through a jump host?

Astlaan avatar Jun 01 '19 16:06 Astlaan

Any update on this?

Astlaan avatar Jul 10 '19 18:07 Astlaan

This is not a scenario that SSHFS-Win supports directly. However the included sshfs.exe program can be run under Cygwin and supports most functionality found in Linux sshfs. So I find it likely that it should be possible, but I do not have a set of instructions for you to follow.

billziss-gh avatar Jul 11 '19 15:07 billziss-gh

Just create a LocalForward using a different ssh client, then you can just point sshfs to localhost[!PORT] to connect over your LocalForward.

burgerga avatar Jul 23 '19 06:07 burgerga

Just create a LocalForward using a different ssh client, then you can just point sshfs to localhost[!PORT] to connect over your LocalForward.

This could work yes, thanks! In the end, Syncthing worked for my purposes and I ended up using that one instead.

Astlaan avatar Sep 29 '19 13:09 Astlaan

It runs pure cygwin ssh from openssh package. You can setup host in your ~/.ssh/config and use that name with sshfs.

pyhedgehog avatar Nov 10 '19 19:11 pyhedgehog

Editing ~/.ssh/config is not sufficient. The problem is that using either ProxyCommand or ProxyJump forces sshfs.exe to use some kind of sh.exe which is by default missing on the Windows' Path.

I have installed SSHFS into C:\software\SSHFS-Win directory. I tried to mount my home directory on remote server dest accessing it through an intemediate machine intermidiate.

C:\software\SSHFS-Win\bin\sshfs-win cmd -v user1@dest:.  R: -o ProxyJump=user2@intermidiate:1022  -o ssh_command="C:/software/SSHFS-Win/bin/ssh.exe"

The result was:

/bin/sh: No such file or directory
banner exchange: Connection to UNKNOWN port 65535: Broken pipe
read: Connection reset by peer

I downloaded win-bash and placed its sh.exe into my C:\software\SSHFS-Win\bin\sshfs-win\bin. And that helped. Thanks to @sevmonster and his https://github.com/billziss-gh/sshfs-win/issues/152#issuecomment-597087792.

vonopr avatar Jul 13 '21 10:07 vonopr