ssh -L 3000:localhost:3000 dev@staging.example.com

Category: Web App Development

ssh -L 3000:localhost:3000 dev@staging.example.com

Forward a local port to a remote service

Creates a secure tunnel so localhost:3000 on your machine forwards to port 3000 on the staging host. The -L flag maps local port to remote host and port. This reaches services that are not exposed publicly, like a database admin UI.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.