CommandCross-platform

Portal Tunnel

Create SSH Local Port Forward

Creates a secure tunnel from your local machine to a remote server. Access remote services as if they were running locally - perfect for databases, internal APIs, or web apps behind firewalls.

ssh -L 8080:localhost:80 user@remote-server
ssh -L 5432:db-server:5432 user@bastion-host

Usage Notes

  • -L creates a local port forward
  • Format: local_port:target_host:target_port
  • Add -N to not execute remote commands (just tunnel)
  • Add -f to run in background
  • Access the tunneled service at localhost:8080

Warnings

  • Warning:Ensure you have authorization to access the remote service
  • Warning:Local port must not be in use by another application

Related Scroll Ideas

  • • Create reverse SSH tunnel for remote access
  • • Set up dynamic SOCKS proxy with SSH
  • • Configure SSH config file for persistent tunnels