SSH Tunneling — Remote Wireshark and Virtual Network Function Troubleshooting

Derek Cheung
7 min readMay 4, 2020
Harvard’s Widener Library, Cambridge, MA, USA [© F2018]

Introduction

SSH Tunneling is very useful for SSH clients and servers to utilize their local and remote resources respectively over one or multiple chained SSH sessions. Broadly speaking, there are three types of SSH tunnelings namely the:

  • Local Port Forwarding — Forward a local application (e.g., a web browser) and a local TCP port say, 8081 to the remote SSH server running say the Nginx application on the TCP port 80 (i.e.., ssh user@remote_server -L 80:localhost:8081). After the SSH session with Local Port Forwarding is setup between the SSH client and the server, the user on the local SSH client can invoke a web browser to http://localhost:8081 to access the remote Nginx application securely with encryption. This also works when the local PC and the remote server are separated by multiple Firewalls and Jump boxes. We can use the SSH Local Port Forwarding to stitch up multiple SSH tunnels with Local Port Forwarding to access the remote server’s Nginx application securely. Part 2 of this series of SSH Tunneling articles talks about Stitching multiple SSH tunnels with Local Port Forwarding to access to a Prometheus server on a Kubernetes Cluster on Microsoft’s Azure Cloud from your home PC.
  • Dynamic Port Forwarding — A company may have implemented some…

--

--