> For the complete documentation index, see [llms.txt](https://blog.tyler-staut.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.tyler-staut.cloud/pentesting/misc-commands/ssh-tunnel.md).

# SSH Tunnel

```bash
ssh -L [LOCAL_IP:]LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SSH_SERVER
```

The options used are as follows:

* `[LOCAL_IP:]LOCAL_PORT` - The local machine IP address and port number. When `LOCAL_IP` is omitted, the ssh client binds on the localhost
* `DESTINATION:DESTINATION_PORT` - The IP or hostname, and the port of the destination machine
* `[USER@]SERVER_IP` - The remote SSH user and server IP address
