Update an existing SSH tunnel. Only the fields present in the body change. A change of the SSH host, port, user or key of a connected tunnel is saved and the tunnel reconnects with it, which interrupts the connections running through it. A new forwarded endpoint, set directly or by linking a target, is used by a connected tunnel without a reconnect. A failed or disconnected tunnel reconnects after any change. When the reconnect fails, the change stays saved and the response shows the tunnel failed with the reason.
Parameters
SSH Tunnel ID (UUID)
Request body application/json · UpdateSSHTunnelRequest
SSH tunnel update request
Host the tunnel forwards to, as seen from the bastion. A connected tunnel uses it without a reconnect.
Port the tunnel forwards to. Requires remote_host in the request or on the tunnel.
Password for sudo operations on remote server
PostgreSQL target to link the tunnel to. An empty string unlinks the linked target.
Responses
OK
SSHTunnelResponse · 18 fields
Reason of the last failure of the tunnel in Principal's words. Never a driver or dial error
Reason of the last failed health check, or of the failed reconnects of a tunnel that stopped because nobody used it
Always 0. Principal no longer opens a local port for a tunnel. Kept for wire compatibility.
SSH key the tunnel signs in with. Omitted when the tunnel has no key.
disconnectedconnectingconnectedfailedChanges of a target that depends on the tunnel, linked or selecting it in its connection settings, are paused by the operator. The detail names the paused targets
Common errors: 400 401 403 404 413 429 503 504. They mean the same for every operation, see Errors.