Attach a local tunnel to a host alias.
Section: Client Config Advanced
Local forward in config
sshconfig
sshconfig
Host db-tunnel
HostName bastion.example.com
LocalForward 5432 db.internal:5432Explanation
Attach a local tunnel to a host alias.
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 Client Config Advanced
Multiplexing in config
Enable connection sharing globally or per host.
Agent forwarding in config
Enable agent forwarding for specific hosts only.
Use a specific SSH agent socket
Point a host entry at a chosen agent socket.
LocalCommand in config
Run a local command after a successful connection.