spantaleev / sftpman

Application that handles sshfs/sftp file systems mounting.
GNU General Public License v3.0
32 stars 7 forks source link

is it possible to connect through a gateway ? #14

Closed steveoriol closed 2 years ago

steveoriol commented 2 years ago

the same way you can do it with the following command: ssh -C user@gateway.com -t ssh user@cible.com

spantaleev commented 2 years ago

How would the same be accomplished using an sshfs command?

Perhaps sshfs -o ssh_command='ssh -C user@gateway.com -t ssh user@cible.com'?

I think your command just calls the ssh client program on gateway.com.

Perhaps you need to use a jump host instead (-J)?


I wonder if defining something like this in ~/.ssh/config would work for sshfs:

Host cible.com
    User user
    ProxyJump gateway.com

Host gateway.com
    User user

You can then probably just say you'd like to connect to cibble.com (via sshfs or SftpMan, which will call sshfs anyway) and you'd have that connection jump through gateway.com automatically.

steveoriol commented 2 years ago

@spantaleev , Merci ! Thank you, why ~/.ssh/config file, it works perfectly :-)