How to mount remote SSHFS via intermediate machine? Tunneling?

You can use option ssh_command of sshfs to do the trick:

sshfs ma: /mnt -o ssh_command='ssh -t mb ssh'

Unmount with the usual

fusermount -u /mnt

Sorry this is 7 years late...


yeah tunneling. You connect machine B, create local tunnel (-L) to SSHd port of machine A then sshfs to localhost to the port of newly created tunnel.


This is what works for me on HighSierra 10.13.6, SHFS version 2.5 (OSXFUSE SSHFS 2.5.0) OSXFUSE 3.10.4. FUSE library version: 2.9.7

Based on Rodrigo Farias's answer above + clemisch and Ohad Rubin comments for noting the -J option:

sshfs -p port finalserver_username@finalserver:/path/to/folder/on/finalserver/ /local/mount/point -o ssh_command='ssh -J intermediate_server_username@intermediate_server:port'