Using SSH to Forward a Remote Port Locally

A recent job reminded me that ssh can be used to forward a port on a remote system to one on the local client machine, like so:

In that example, I could now visit http://localhost:8000 in a web browser to access the remote web server over the ssh connection. This is useful for troubleshooting or setting up services before allowing public access.