SSH Tunnel Generator

SSH Connection
SSH Config Alias
User
Host
SSH Port
Identity File
Tunnel Configuration
Bind Address
Port
Remote Host
Port
Bind Address
Port
SSH Options
ServerAliveInterval - 0 to disable
Execution Options
Route Configuration
Netmask
Gateway

© 2025 Luka Uzel — Open sourced under the MIT License.

loCode V1.0.0 built with ❤️ using Symfony, Alpine.js, Bootstrap and Docker

Thu. 5 March 2026 09:59

Help

SSH Tunnel Generator

Generate SSH tunnel commands for port forwarding and secure proxying.

Tunnel Types:

  • Local Forwarding (-L): Forward local port to remote destination through SSH server
  • Remote Forwarding (-R): Forward remote port back to local destination
  • Dynamic Forwarding (-D): Create SOCKS proxy on local port

Common Use Cases:

  • Access remote service: Local forwarding to reach services behind firewall
  • Expose local service: Remote forwarding to make local service accessible remotely
  • SOCKS proxy: Dynamic forwarding for browser proxy or tunneling all traffic

Options:

  • -N: Don't execute remote command (port forwarding only)
  • -v/-vv/-vvv: Verbose output (debugging)
  • -C: Enable compression
  • GSSAPIAuthentication: Kerberos authentication (disable for faster connection)
  • ServerAliveInterval: Keep connection alive (seconds between keepalive messages)

Route Commands:

When tunneling creates a virtual interface, you may need to add routes:

  • Host route: Route single IP through tunnel gateway
  • Network route: Route entire subnet through tunnel gateway

Examples:

# Access remote database
ssh -L 127.0.0.1:3306:db.internal:3306 user@jumphost -N

# SOCKS proxy for browser
ssh -D 127.0.0.1:1080 user@server -N

# Expose local web server
ssh -R 0.0.0.0:8080:localhost:80 user@server -N