Docs
Live demo
POST/api/v2/ssh-tunnels/test-connection

Test an SSH connection without creating a tunnel. Returns success/failure with detailed error message. On success, returns a test token that must be used when creating the tunnel. This ensures the connection is tested before saving.

Request body application/json · TestConnectionRequest

Connection test request

Required3 of 6 fields
ssh_hoststringrequired
ssh_key_idstringrequired
ssh_userstringrequired
min length 1 · max length 255
Optional3 fields
remote_hoststring
remote_portinteger
min 1 · max 65535
ssh_portinteger
min 1 · max 65535

Responses

200

OK

TestConnectionResponse · 9 fields
error_messagestring

Why the test failed, written for the operator (for example a changed host key, a key that is not authorized, a host that cannot be resolved or reached). It never carries the underlying library or storage error.

install_script_urlstring
successboolean
sudo_checked_atstring · date-time
sudo_errorstring

Why sudo cannot run the pg_hba.conf commands. Set only when the connection succeeded.

sudo_missing_commandsarray of string
sudo_modestring
sudo_okboolean

Whether the SSH user may run the pg_hba.conf commands with sudo. Absent when the connection failed.

test_tokenstring

Common errors: 400 401 403 409 413 429 503 504. They mean the same for every operation, see Errors.

↑ ↓ to moveEnter to openEsc to close