Post

SSH tunnel to Samba server via hron

How to SSH through a jump host (hron) to reach a Samba server, including SCP file copy over the tunnel.

SSH tunnel to Samba server via hron

How to SSH to Samba server via hron

This example demonstrates how to use SSH agent forwarding and a jump host to reach a remote Samba server. It also shows how to copy files from the Samba server to your local machine through the jump host using SCP with the ProxyJump option.

1
2
3
4
5
6
7
8
9
10
eval `ssh-agent`
# add SSH key to keyring
ssh-add ~/.ssh/hron

ssh -A -i ~/.ssh/hron  \
tothj@hron.fei.tuke.sk  \
-t ssh jantoth@147.232.47.151

# copy from samba to localhost over jumphost
scp -A -i ~/.ssh/hron -o 'ProxyJump tothj@hron.fei.tuke.sk'  jantoth@147.232.47.151:/tmp/samba.tgz .
This post is licensed under CC BY 4.0 by the author.