SSH jump host
Jump hosts are extremely common to manage access to a specific network. A user/device is only able to connect to a certain network by passing through the jump host.
Keep in mind that the user
of the jump host is not necessarily the same as the user
of the destination
.
SSH
Using a jump host with OpenSSH is very easy. The -J
parameter can be used to specify a jump host:
ssh -J user@jump-host.com user@desitnation
rsync
The beloved rsync
provides the command line option -e
to specify a different remote shell:
rsync -avzh -e "ssh -J user@jump-host.com" /path/to/source root@destination:/path/to/destination
SCP
Although being old and and “officially” outdated, SCP is still around. SCP provides the -oProxyJump
parameter to specify a jump host:
scp -oProxyJump=user@jump-host.com <files_to_copy> user@destination:<desitnation_path>