Bug Description
When editing a workflow in the n8n UI (e.g. modifying Code nodes) and saving, SSH nodes that were not opened or edited have their parameters silently overwritten to {}. This causes all SSH commands, credentials references, and settings to be lost without any warning.
Steps to Reproduce
- Create a workflow with SSH nodes that have commands configured (e.g.
command: "python3 -c ...", waitForResponse: true)
- Confirm the workflow works correctly (SSH nodes execute commands and return output)
- Open the workflow in the n8n editor
- Edit a different node (e.g. a Code node) — do NOT open or touch the SSH nodes
- Save the workflow
- Check the SSH nodes — their
parameters are now {} (empty), all commands lost
Expected Behavior
Saving the workflow should preserve all node parameters, including nodes that were not opened or edited in the current session.
Actual Behavior
SSH node parameters are overwritten to {} when the workflow is saved, even though the SSH nodes were never opened or modified during the editing session.
Evidence
- Workflow
ENPdYjvVKi8RKBem on n8n 2.36.8
- Execution 62 (before edit at 02:07): SSH node
读本地版本 returned stdout: "4.4.3.7" — correct
- Workflow saved at 02:13 (edited Code nodes only, SSH nodes untouched)
- Execution 63 (after edit at 02:15): same SSH node returned
stdout: "" — parameters cleared
- Direct DB query on
workflow_entity table confirmed parameters: {} stored for SSH nodes after save
- Previous version recovered from
workflow_history table shows original parameters were correct:
{"command": "python3 -c \"import json; print(json.load(open('/root/bypass-paywalls-chrome-clean/manifest.json'))['version'])\"", "waitForResponse": true}
Environment
- n8n version: 2.36.8 (Docker via 1Panel)
- OS: Linux (ARM64)
- Database: SQLite
- Node type affected:
n8n-nodes-base.ssh (typeVersion 3)
Impact
This is a data-loss bug. Users can lose critical automation commands without any warning or indication. In our case, the SSH nodes silently stopped executing their commands (returning exit code 0 with empty output), which could go unnoticed for a long time if the workflow doesn't have output validation.
Workaround
- Move SSH commands to external script files on the target machine, so the node only needs
bash /path/to/script.sh
- Before editing any workflow, export the full workflow JSON via API as backup
- Recover lost parameters from
workflow_history SQLite table: SELECT nodes FROM workflow_history WHERE versionId='<old-version-id>'
Bug Description
When editing a workflow in the n8n UI (e.g. modifying Code nodes) and saving, SSH nodes that were not opened or edited have their
parameterssilently overwritten to{}. This causes all SSH commands, credentials references, and settings to be lost without any warning.Steps to Reproduce
command: "python3 -c ...",waitForResponse: true)parametersare now{}(empty), all commands lostExpected Behavior
Saving the workflow should preserve all node parameters, including nodes that were not opened or edited in the current session.
Actual Behavior
SSH node parameters are overwritten to
{}when the workflow is saved, even though the SSH nodes were never opened or modified during the editing session.Evidence
ENPdYjvVKi8RKBemon n8n 2.36.8读本地版本returnedstdout: "4.4.3.7"— correctstdout: ""— parameters clearedworkflow_entitytable confirmedparameters: {}stored for SSH nodes after saveworkflow_historytable shows original parameters were correct:{"command": "python3 -c \"import json; print(json.load(open('/root/bypass-paywalls-chrome-clean/manifest.json'))['version'])\"", "waitForResponse": true}Environment
n8n-nodes-base.ssh(typeVersion 3)Impact
This is a data-loss bug. Users can lose critical automation commands without any warning or indication. In our case, the SSH nodes silently stopped executing their commands (returning exit code 0 with empty output), which could go unnoticed for a long time if the workflow doesn't have output validation.
Workaround
bash /path/to/script.shworkflow_historySQLite table:SELECT nodes FROM workflow_history WHERE versionId='<old-version-id>'