Sftp login w/ PAM Authentication does not work

Hello n8n Team,

Credentials for sftp do not work when remote server is set to “PAM Authentication”. It works w/ standard sftp (ssh) authentication.

What is the error message (if any)?

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

Error: connect->getConnection: All configured authentication methods failed
    at fmtError (/usr/lib/node_modules/n8n/node_modules/ssh2-sftp-client/src/utils.js:55:18)
    at SftpClient.connect (/usr/lib/node_modules/n8n/node_modules/ssh2-sftp-client/src/index.js:218:13)
    at Object.execute (/usr/lib/node_modules/n8n/node_modules/n8n-nodes-base/nodes/Ftp/Ftp.node.ts:505:5)
    at Workflow.runNode (/usr/lib/node_modules/n8n/node_modules/n8n-workflow/src/Workflow.ts:1261:19)
    at /usr/lib/node_modules/n8n/node_modules/n8n-core/src/WorkflowExecute.ts:949:29

Please share your workflow

Information on your n8n setup

  • n8n version:0.222.3
  • Database (default: SQLite):SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):main
  • Running n8n via (Docker, npm, n8n cloud, desktop app):npm
  • Operating system:Debian 5.10.106-1

Thank you for all the great work with n8n! I really enjoy working on workflows and some of them are really mission critical for us.

Kurt

Hey @kje,

Is there anything special with your PAM configuration like maybe MFA? Our nodes are not designed to be “interactive” so if any additional prompts are required it will cause some issues.

It could also be worth trying the SSH node to see if that lets you in, It has support for uploading and getting files so could be a good alternative.

Hi @Jon,

thx for the quick response! No, there is no MFA involved, it works from the command line on the very same host with the same user n8n runs on.

ssh is no option, because interactive logins are disabled, its just a big coporate sftp server for file exchanges.

Maybe I have to script it via command line but that would kill the beauty of n8n workflows though.

Kurt

Hey @kje,

When you run it from the terminal do you get any extra prompts or anything? I can’t think of a reason for it to fail but sometimes SSH can get a bit funky.

Any chance you could connect from a terminal using sftp -vv and sending me a DM with the output (with anything sensitive removed) so I can take a look?

Hi @Jon

thx. for looking into this (I sent a -vv log via DM) - but I created a key based login in the meantime, works like a charm.

n8n rocks!

Thank you, Kurt

1 Like

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