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

  1. Check n8n execution log via API:
    GET /api/v1/executions/{id}?includeData=true
    
  2. Look at the SSH Execute node’s error.message — will say does not exist for type "sshPassword".
  3. Execution executionTime is 21ms — too fast to have actually run SSH.

Root Cause

n8n SSH node has TWO credential types:

  • sshPassword — for username + password auth
  • sshPrivateKey — 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

  1. 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()
        }
    }
  2. Update the workflow to match the credential type:

    • Add "authentication": "privateKey" to SSH node parameters
    • Change credential key from sshPasswordsshPrivateKey with new credential ID
  3. Re-activate the workflow via POST /api/v1/workflows/{id}/activate

  4. 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 key

The 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 sshPrivateKey type for private key auth.
  • When importing workflow JSON: ensure parameters.authentication = 'privateKey' and credentials.sshPrivateKey are both set.
  • Test immediately after deploy: if execution takes <200ms and returns “Script produced no output”, check credential type first.
  • Fixed in: PR #1046 (2026-06-22)
  • Affected workflow: atrax-report-generator-webhook (B4daafJKjXHzLWiw)
  • n8n credential: vps-i1-root-ssh (ID: EXatXoTcRtlCr3FM, type: sshPrivateKey)