ssh_forward_port
Forward a local port to a remote host via SSH, tunneling connections through an existing session. Specify remote port and optionally local port or host.
Instructions
Create an SSH port forward (local -> remote). Connections to 127.0.0.1:local_port will be tunneled through SSH to remote_host:remote_port.
If local_port is 0, a random available port is chosen.
Args: session_id: The session ID returned by ssh_connect. remote_port: Port on the remote side to forward to. local_port: Local port to listen on (0 = auto-assign). remote_host: Host on the remote side (default: localhost, i.e. the SSH server itself).
Returns: Dict with forward_id, local_port, remote_host, and remote_port.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"remote_port": "<remote_port>"
},
"name": "ssh_forward_port"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ||
| remote_port | Yes | ||
| local_port | No | ||
| remote_host | No | localhost |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||