I needed to use a mobile 4G hotspot today and realised there’s another very common reason for using SSH jumphosts. You see, when I’m on a 4G hotspot I tend to use VPN client for securing Internet connection. And jumphosts may help in VPN scenarios.
Sometimes I then switch to home WiFi and need to manually disable VPN, otherwise my connection keeps getting protected. Using VPN on home WiFi allows me to use SSH client on laptop to use one of my Raspberry Pi servers as jumphost for connecting to external servers.
The reason this works is because laptop is the only system running VPN, but it usually still has access to local networks in my home network. So if I ssh onto one of my Raspberry Pi servers, any connection I make from there on will use my home’s broadband IP (because Raspberry doesn’t have VPN configured).
How To Specify Jumphost in SSH Client Config
I have my dedicated servers configured like this in /Users/greys/.ssh/config file:
Host s3
HostName s3.unixtutorial.org
Port 212
If I need to use jumphost to access s3, I’ll update this configuration setting:
I'm a principal consultant with Tech Stack Solutions. I help with cloud architectrure, AWS deployments and automated management of Unix/Linux infrastructure. Get in touch!