Playbook: n8n SSH Credential Type Mismatch
Trigger
n8n SSH node fails with Credential with ID "X" does not exist for type "sshPassword" even though the credential ID is correct. SSH-authenticated workflows return “Script produced no output” in 96ms (instant fail, no timeout).
How to Confirm
- Check n8n execution log via API:
GET /api/v1/executions/{id}?includeData=true - Look at the SSH Execute node’s
error.message— will saydoes not exist for type "sshPassword". - Execution
executionTimeis 21ms — too fast to have actually run SSH.
Root Cause
n8n SSH node has TWO credential types:
sshPassword— for username + password authsshPrivateKey— for username + private key auth
If the workflow JSON uses "credentials": {"sshPassword": {...}} but the stored credential is type sshPrivateKey, n8n can’t find it. Also applies in reverse.
Additionally, the SSH node must have "authentication": "privateKey" in its parameters block when using private key auth, otherwise it defaults to looking for sshPassword.
Step-by-Step Fix
-
Create the credential with correct type (via n8n API on bms-4):
# sshPrivateKey type — for key-based auth payload = { "name": "vps-i1-root-ssh", "type": "sshPrivateKey", "data": { "host": "217.154.82.162", "port": 22, "username": "root", "privateKey": open('/home/claude-runner/.ssh/id_ed25519').read() } } -
Update the workflow to match the credential type:
- Add
"authentication": "privateKey"to SSH nodeparameters - Change credential key from
sshPassword→sshPrivateKeywith new credential ID
- Add
-
Re-activate the workflow via
POST /api/v1/workflows/{id}/activate -
Update the workflow JSON in the p24-infra repo to reflect the fix (PR → main).
SSH Auth Requirements on vps-i1
The key used in the n8n credential must be authorized on vps-i1 for the target user:
# From vps-i1, check authorized keys:
cat /root/.ssh/authorized_keys
# Must contain the public key matching the n8n credential's private keyThe claude-runner@bms-4 key (ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYQAkhdU7UjGuo8qtUNMRXwLh4jPp+lVxk9/bboLv3w) is currently authorized on vps-i1’s root. The n8n credential vps-i1-root-ssh (ID: EXatXoTcRtlCr3FM) uses this key.
Prevention
- When creating n8n SSH credentials via API: always use
sshPrivateKeytype for private key auth. - When importing workflow JSON: ensure
parameters.authentication = 'privateKey'andcredentials.sshPrivateKeyare both set. - Test immediately after deploy: if execution takes <200ms and returns “Script produced no output”, check credential type first.
Related
- Fixed in: PR #1046 (2026-06-22)
- Affected workflow:
atrax-report-generator-webhook(B4daafJKjXHzLWiw) - n8n credential:
vps-i1-root-ssh(ID: EXatXoTcRtlCr3FM, type: sshPrivateKey)