SFTP-Connect via FTP-Node in Desktopversion does not work

Describe the issue/error/question

At this Time it ist not possible for me to connect to our SFTP-Server via Desktopversion. The Cloudserver-Version works fine and connects. I’m working with User-ID and Password as authorisation method…

What is the error message (if any)?

ERROR: connect->getConnection: All configured authentication methods failed

Please share the workflow

{
“nodes”: [
{
“parameters”: {},
“name”: “Start”,
“type”: “n8n-nodes-base.start”,
“typeVersion”: 1,
“position”: [
240,
300
]
},
{
“parameters”: {
“protocol”: “sftp”,
“operation”: “list”
},
“name”: “FTP”,
“type”: “n8n-nodes-base.ftp”,
“typeVersion”: 1,
“position”: [
460,
300
],
“credentials”: {
“sftp”: {
“id”: “6”,
“name”: “SFTP-MUM”
}
}
}
],
“connections”: {
“Start”: {
“main”: [
[
{
“node”: “FTP”,
“type”: “main”,
“index”: 0
}
]
]
}
}
}
(Select the nodes and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow respectively)


## Share the output returned by the last node
<!-- If you need help with transforming the data, please also share the expected output -->

## Information on your n8n setup
- **n8n version: Desktop Version 1.2.0**

Hey @PetKos,

Welcome to the community :tada:

That error tends to mean that the server is not happy with the authentication method and has no more options available. With the credentials in the desktop app it might be worth making sure there is no key data as well.

Out of interest do you control the SFTP server you are connecting to or is it ran by a hosting provider?

Hi Jon,

thanks for your quick reply.

The striking thing is that the N8N cloud server establishes the connection without any problems, but the desktop version does not.
So I rule out that the FTP server is the problem. Incidentally, the FTP server is hosted by IONOS.

Best regards

Peter

Hey @PetKos,

That is interesting I have been looking another issue relating to Ionos with the desktop app. You get an error message though during my testing it has been loading with no error message.

What I do know so far is cloud, docker and running from source is ok it is only the desktop app that fails and it isn’t all SFTP / SSH servers but the ionos one lets me reproduce the issue consistently.

Once I have more I will let you know, out of interest where did you see that error message?

Hey Jon,

I saw the error message in the desktop app when running the FTP node.

Hey @PetKos,

That is interesting and suggests a different issue to the one I am looking at, If I input an incorrect password for ionos I get the below error message which I believe is what you are seeing. Are you able to try an incorrect password then input the correct password again making sure there are no spaces at the end or the start and see if you get the same error again or if it just loops forever.

Error: connect->getConnection: All configured authentication methods failed
    at fmtError (/Applications/n8n.app/Contents/Resources/app/node_modules/ssh2-sftp-client/src/utils.js:55:18)
    at SftpClient.connect (/Applications/n8n.app/Contents/Resources/app/node_modules/ssh2-sftp-client/src/index.js:213:13)
    at async Object.execute (/Applications/n8n.app/Contents/Resources/app/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:342:17)
    at async /Applications/n8n.app/Contents/Resources/app/node_modules/n8n-core/dist/src/WorkflowExecute.js:447:47

Hey Jon,

I get the same error regardless of the password. That means it doesn’t matter which password I enter. The error message is always the same.

Error: connect->getConnection: All configured authentication methods failed
    at fmtError (/private/var/folders/_t/5l1sbfl14bv981t88sv4pxx00000gn/T/AppTranslocation/6C1903DF-731B-4E21-AEAB-2C2859447221/d/n8n.app/Contents/Resources/app/node_modules/ssh2-sftp-client/src/utils.js:55:18)
    at SftpClient.connect (/private/var/folders/_t/5l1sbfl14bv981t88sv4pxx00000gn/T/AppTranslocation/6C1903DF-731B-4E21-AEAB-2C2859447221/d/n8n.app/Contents/Resources/app/node_modules/ssh2-sftp-client/src/index.js:213:13)
    at async Object.execute (/private/var/folders/_t/5l1sbfl14bv981t88sv4pxx00000gn/T/AppTranslocation/6C1903DF-731B-4E21-AEAB-2C2859447221/d/n8n.app/Contents/Resources/app/node_modules/n8n-nodes-base/dist/nodes/Ftp/Ftp.node.js:342:17)
    at async /private/var/folders/_t/5l1sbfl14bv981t88sv4pxx00000gn/T/AppTranslocation/6C1903DF-731B-4E21-AEAB-2C2859447221/d/n8n.app/Contents/Resources/app/node_modules/n8n-core/dist/src/WorkflowExecute.js:447:47

That is interesting, so the error you have is defined as being an authentication issue but as your credentials are correct I am not sure why the server is rejecting them.

Are you using shared Linux hosting on ionos as well? If I DM you some credentials in the morning would you be able to test a connection to them and see if they work for you?

Hey Jon,

I tested again today and looked at the log on the server.
According to the server, there are no errors, the open request arrived there and the credentials were accepted. After that, the connection was closed by the desktop client. See attached lines from the log:

Apr 12 15:32:26 10.71.57.0 u107583175-mmm Connection from 10.71.57.0 port 61000 on 82.165.88.50 port 22
Apr 12 15:32:26 10.71.57.0 u107583175-mum Accepted password for u107583175-mmm from 10.71.57.0 port 61000 ssh2
Apr 12 15:32:26 10.71.57.0 u107583175-mmm Connection closed by 10.71.57.0 port 61000

Hey @PetKos,

That is strange, Is the server able to output the full handshake / auth process? It would be interesting to see what the server is sending back.

Hey Jon

there is no way for me to get this information. I will probably switch to another server.

Thanks for your Help.

Hey @PetKos,

No problem, If it helps using n8n through npm or in Docker / Cloud shouldn’t have the same issue so it might be worth a test as well.