
if I need to go through a. first, then b., before getting to c. which is ultimately where I want to login to, then here’s what I’d do: ssh -J c. I can specify user names and port numbers on the server specification for the jump host, and I can also string multiple jump hosts together. if I want to get to b., but first have to hop through a., then this is what I need to do: ssh -J a. b. Run SSH with the -J argument specifying the jump host. It turns out SSH supports a built-in feature to navigate SSH jump hosts. It is tedious if you have to do that many times. When I’m working out of office, I often find myself having to SSH to server A, then from there SSH to server B, and then, maybe, on to server C. The next feature is also related to remote access to services protected from direct Internet access. Using SOCKS, I can easily bypass the need to use a VPN client, and simply use SSH to connect with any service that is accessible from the remote SSH server. The client-side application, however, has to support SOCKS proxy. Your web browser should then be configured to use a SOCKS proxy on localhost at port 5000.Īs I mentioned earlier, SOCKS can work with other protocols. E.g.: ssh -D 5000 tells SSH to connect to the server, and start up a SOCKS proxy listening on port 5000. On the SSH end, connect to your favourite SSH jump host with the -D xxxx argument. Also from that screen, you can tell Firefox to always ask you to choose a profile to use every time it starts, so you don’t have to run it with the -p argument. Firefox will launch with the Choose User Profile screen from which you can create a new profile, or choose an existing profile to use. To create a new profile, start Firefox with the -p argument. I use a separate Firefox profile for proxy web access. Firefox, thankfully, has its own proxy configuration. I can change the operating system’s configuration, but it is troublesome when I don’t want SOCKS to be a default system-wide setup. Chrome, however, doesn’t have its own proxy configuration it uses whatever the operating system has been setup to use. Google’s Chrome web browser is my primary web browser. There’s a reason why I use Firefox for this. Whenever I need to tunnel my web access through a SOCKS proxy, I simply launch Firefox with the second profile. This way, I can still choose to run Firefox as normal, without a proxy, by running it with the default profile. I use Firefox, create a new, separate, profile and set that up to use a SOCKS 5 proxy. The way I use SOCKS with my web browser is like this. The client side application, however, needs to support SOCKS proxies. SOCKS proxies, however, are more flexible, because it can be used for any TCP network connection on any port. A web browser connects to and uses the proxy to access Internet content. SOCKS proxies are much more convenient to use. If you need to access five remote websites, then you’ll need five port forwarding rules. Port forwarding isn’t difficult to setup, but it is tedious when you need to work with a variety of remote services.

I use port forwarding in lieu of a VPN to access intranet web servers. Port forwarding can be used with many applications, but one of the common uses is with a web browser to access a remote web server hidden behind a SSH server. Power users are probably familiar with setting up port forwarding to get around firewalls.

The first is that SSH has a built-in SOCKS 5 proxy. They deal with secure remote access to intranet resources SOCKS Proxy There are two important features that I want to mention. The problem with “old users” like me is that we are sometimes unfamiliar with new features that get added in later times. I started using SSH since its beginnings, well over 20 years ago. Over the years, while doing the same old things with SSH over and over again, I sometimes will wonder if there is just a better way to do what I’m doing. I know pretty much most things on this 25 Best SSH Commands / Tricks post. I use SSH not just for remote logins, but also for unattended file copies, command execution, file/directory synchronisation, port tunnelling, and more. There’s a difference between simply just using a tool extensively, and being an expert with the tool. Despite using SSH so extensively, I still discover new things I can do with it from time to time. I do a lot of work on remote Unix servers, so SSH is one of the most important programs I use everyday.
