Let's say that ghisler.ch is in a private network and ghisler.com can be used as a gateway to reach it from the Internet.
You can test if your SSH/SFTP server would support the scenario with the following ssh config file in a linux VM:
Code: Select all
#ProxyCommand ssh -W %h:%p public #use as an alternative if your ssh client doesn't support the ProxyJump directive
Once configured in you ssh config file, you should be able to access ghisler.ch through ghisler.com just by typing
and you system will automatically connect through to the private target through the public one.
By enabling verbosity in the ssh client you can confirm the use of the proxy host which should look more or less like this:
Code: Select all
ssh -v private
debug1: Setting implicit ProxyCommand from ProxyJump: ssh -v -W '[%h]:%p' public
debug1: Executing proxy command: exec ssh -v -W '[ghisler.ch]:22' public
[Banner of ghisler.com SSH server]
[Banner of ghisler.ch SSH server]
Once you validated it's OK with a regular linux client, you're safe to test it within the plugin implementation.
Of course, it doesn't make much sense to do this with two public hosts, but it allows you to test the jump functionality nevertheless.
Beware, the proxy host ssh daemon (the public one in this example, ghisler.com) has to allow proxying (which is usually enabled by default in regular distros, but might not be the case if you don't have full control over the host).
If the SSH server at ghisler.com does not allow this for whaterver reason and you prefer not to fiddle with its configuration, a standard Debian 10 VM with the ssh daemon enabled will do just fine as ProxyHost.