Describe the problem/error/question
We are trying to SSH into a router from our self-hosted n8n server but we received this error: ‘The connection is closed by the SSH server. Current FSM is Disconnect.’ What should we check, and how do we fix this issue? All SSH credentials and connectivity are set up properly.
can’t sign in, instance unavailable), please contact support at help@n8n.io -->What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
{
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-192,
144
],
"id": "2df66140-18f8-4cfb-8e88-f3b9551038ca",
"name": "When clicking ‘Execute workflow’"
},
{
"parameters": {
"command": "display version"
},
"type": "n8n-nodes-base.ssh",
"typeVersion": 1,
"position": [
16,
144
],
"id": "e947c9ba-d828-4490-8ad1-e5a99b5cf292",
"name": "Execute a command",
"alwaysOutputData": true,
"credentials": {
"sshPassword": {
"name": "SSH Password account"
}
}
}
],
"connections": {
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Execute a command",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "3d1b8feb96140bbc11a6a410c27c7cb04f42940da43d0df2759b46942c8c8350"
}
}
Share the output returned by the last node
<{
“errorMessage”: “The connection is closed by SSH Server\r\nCurrent FSM is Disconnect”,
“errorDetails”: {},
“n8nDetails”: {
“n8nVersion”: “2.18.5 (Self Hosted)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“Error: The connection is closed by SSH Server\r”,
“Current FSM is Disconnect”,
" at DISCONNECT (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/ssh2@1.15.0/node_modules/ssh2/lib/client.js:342:25)“,
" at 1 (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/ssh2@1.15.0/node_modules/ssh2/lib/protocol/handlers.misc.js:53:16)”,
" at Protocol.onPayload (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/ssh2@1.15.0/node_modules/ssh2/lib/protocol/Protocol.js:2059:10)“,
" at GenericDecipherNative.decrypt (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/ssh2@1.15.0/node_modules/ssh2/lib/protocol/crypto.js:1269:26)”,
" at Protocol.parsePacket [as _parse] (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/ssh2@1.15.0/node_modules/ssh2/lib/protocol/Protocol.js:2028:25)“,
" at Protocol.parse (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/ssh2@1.15.0/node_modules/ssh2/lib/protocol/Protocol.js:313:16)”,
" at Socket. (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/ssh2@1.15.0/node_modules/ssh2/lib/client.js:775:21)“,
" at Socket.emit (node:events:508:28)”,
" at addChunk (node:internal/streams/readable:563:12)“,
" at readableAddChunkPushByteMode (node:internal/streams/readable:514:3)”
]
}
}
Information on your n8n setup
- **n8n version:**2.18.5
- Database (default: SQLite):SQLite
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
- Operating system: