I usually don’t just repost other people’s posts, but this one really deserves some extra attention. It explains a very elegant way to hop using SSH.
In every network setup with some level of security, there are hosts that can’t be reached directly. Instead, you need to connect to some intermediate machine first, and hop further from there. If you have set up public key authentication, SSH can do all of this for you in the background, just add a few config lines to .ssh/config:
ProxyCommand ssh intermediate-host nc %h %p
This will issue an SSH connection to intermediate host, launch a netcat process to realize the hop, and connect to your unreachable host. Obviously, netcat or similar is required on intermediate-host.