Core node FTP (SFTP)

On this node there is no option to specify single conection with the server. Some ol servers do not support multiple conections .

Hey @Bosco,

When you say multiple connections what do you mean? It might sound a bit odd but our node should only open one connection at a time although it might be a bit too quick between the disconnect and the next connection attempt.

Hy Jon

When a define a connection on the node it try to connect and this is working ok. When I execute the node for listing the files it it does the connection and the list command.
It seams that these two operations uses two simultaneos connections.

Using Filezzila to simulate , the default is to use multiple connections and it does not work but if we force Filezzila to use a single connection it works ok.

Hey @Bosco,

Looking at the node we only make one connection rather than 2 so it should be working, What error are you seeing when you try to list the files?

ERROR: connect->getConnection: Timed out while waiting for handshake


Error: connect->getConnection: Timed out while waiting for handshake
    at fmtError (/usr/local/lib/node_modules/n8n/node_modules/ssh2-sftp-client/src/utils.js:55:18)
    at SftpClient.connect (/usr/local/lib/node_modules/n8n/node_modules/ssh2-sftp-client/src/index.js:218:13)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:436:21)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:670:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:652:53

This is the workflow

this is the connection

Also lokking into the code tehlist operation starts with acheck connection ASYNC. and goes to the List command. This may be the second connection I was talking about.

Hey @Bosco,

A timeout is a bit different, So in the node we first create an on sftpClient object which opens our connection then we run the list using the same connection. You mentioned the multiple connections are you seeing 2 connections in the SFTP server side or is that a guess?

Can you explain how to fill the Private Key field in a connection for SFTP.
I Tried with


and didn’t worked ( COnnection Time OUT on hand shake protocol

If i use a file name it does not work saying that can’t parse the file.

Hey @Bosco,

I tend to just paste the entire private key into the Private Key field including the begin and end lines and it just works.

A connection timeout could be a network issue rather than an authentication problem, Although it could also be a KEX problem during the handshake.

Thanks Jon
It worked.
The time out was caused by the sftp server that only accepts connection after a 5 minutes interval…So if a do a List, to send the download i have to wait 5 minutes.

1 Like

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