SFTP ProxyJump support

Any thoughts on supporting ProxyJump for SFTP backend?

The main use case is that remote sftp storage machines, behind a firewall, would usually create a tunnel to an intermediary. In order for rclone to connect through the intermediary first, the ProxyJump would specify the intermediary (often as a name to another SSH server listed in ~/.ssh/config, or in rclone.conf).

As a slightly related side feature: It may be nice for rclone to support looking up sftp clients in ~/.ssh/config, to save having to list them twice for those who want both SSH access to a remote, and to use SFTP for rclone backups from/to that remote. Although I'm not quite sure the syntax to be used to indicate such in rclone.conf.

1 Like

I found an article explaining ProxyJump - it is neat!

You could certainly do that by hand - so set up the SSH tunnel in advance and use SFTP to that.

So I guess we could imagine a list of intermediaries in the rclone.conf which rclone had to connect to first.

I wonder if we could make rclone use ssh for creating the connection rather than its internal ssh client. Then it would support ProxyJump and looking up in ~/.ssh/config

Using v1.55 syntax that could be something like this :sftp,host=HOST,external assuming that external meant use the external ssh. (There is probably a better name but it won't come to mind!).

2 Likes