SSH connection failed: Timed out while waiting for handshake

Describe the problem/error/question

I am trying to connect via ssh to a windows, so that it executes a .bat
But, it does not make the connection and this message is displayed.

But, if I connect from my windows to the ssh, it connects me without any problem.

What is the error message (if any)?

SSH connection failed: Timed out while waiting for handshake

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • **Database (default: SQLite):**SQLite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):**Own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**Docker
  • Operating system: Ubuntu 22

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • **n8n version:**1.71.3
  • **Database (default: SQLite):**SQLite
  • **n8n EXECUTIONS_PROCESS setting (default: own, main):**Own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app):**docker
  • **Operating system:**Ubuntu 24

Hey @diaverso

I can’t tell from your screenshots but are you trying to use localhost / 127.0.0.1 as the host url from the container?

This is the information that I get from the docker, connecting via remote desktop, if everything works perfectly.

When I enter the server ip, or try with the ip indicated in the portainer, I get the handshake error.

I think, because of some problem. It is not saving the handshake in n8n.

new error:

{
“errorMessage”: “All configured authentication methods failed”,
“errorDetails”: {},
“n8nDetails”: {
“n8nVersion”: “1.72.1 (Self Hosted)”,
“binaryDataMode”: “default”,
“stackTrace”: [
“Error: All configured authentication methods failed”,
" at doNextAuth (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/client.js:865:21)“,
" at tryNextAuth (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/client.js:1082:7)”,
" at USERAUTH_FAILURE (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/client.js:430:11)“,
" at 51 (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/protocol/handlers.misc.js:408:16)”,
" at Protocol.onPayload (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/protocol/Protocol.js:2059:10)“,
" at AESGCMDecipherNative.decrypt (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/protocol/crypto.js:987:26)”,
" at Protocol.parsePacket [as _parse] (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/protocol/Protocol.js:2028:25)“,
" at Protocol.parse (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/protocol/Protocol.js:313:16)”,
" at Socket. (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/client.js:775:21)“,
" at Socket.emit (node:events:519:28)”
]
}
}

This error would suggest the ssh server is not accepting the authentication method we are using with n8n.

Did you update it to use key based auth but are still trying username and password?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.