Est. read time: 1 minute | Last updated: February 23, 2024 by John Gentile


Contents

Common Tasks

SSH

SSH Tunneling

SSH Tunneling can be used to forward certain ports or services over a secure SSH connection. It’s also useful if a local system wants to expose non-SSH services but only has an SSH port open externally through a router. For example, to tunnel Remote Desktop (RDP) to a remote server <remote>:

$ ssh -L 8888:localhost:3389 <username>@<remote>

You can then connect to the RDP session with localhost:8888.

Basic Python Web Server

If you have some static web resources (e.g. HTML pages, etc.), you can quickly spin-up a web server in that directory to display them using Python(3):

$ python -m http.server <port_number>

References