Linux Networking Admin Cheat Sheet/Create local SSH port forward

Forward a local port to a remote host/port through SSH.

Section: DNS HTTP and Remote Connectivity

Create local SSH port forward

bash
bash
ssh -L 5433:127.0.0.1:5432 user@db-bastion
Explanation

Useful for securely reaching private services like databases.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing DNS HTTP and Remote Connectivity
Install SSH public key
Copy your public key to a remote account.
OpenIn sheetbashsame section
Trace DNS delegation
Follow DNS resolution from root to answer.
OpenIn sheetbashsame section
Lookup MX records
Query mail exchanger records.
OpenIn sheetbashsame section
Verbose HTTP request
Show request/response details and TLS handshake summary.
OpenIn sheetbashsame section
POST JSON to API
Send JSON body in an HTTP POST request.
OpenIn sheetbashsame section
Inspect TLS certificate chain
Connect and print TLS handshake details.
OpenIn sheetbashsame section