ssh_tunnel_create
Opens an SSH tunnel for port forwarding or SOCKS proxy. Specify server, tunnel type, and ports. Returns a tunnel ID for management.
Instructions
Opens a new SSH connection to the named server and starts a port-forwarding or SOCKS proxy tunnel that keeps running until closed. The type parameter selects local forward, remote forward, or dynamic SOCKS5 proxy. localPort is always required; remoteHost and remotePort are required for local and remote types but ignored for dynamic. localHost defaults to 127.0.0.1. Returns a tunnel ID used later to close it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| server | Yes | Server name or alias | |
| type | Yes | Tunnel type | |
| localHost | No | Local host (default: 127.0.0.1) | |
| localPort | Yes | Local port | |
| remoteHost | No | Remote host (not needed for dynamic) | |
| remotePort | No | Remote port (not needed for dynamic) |