Issue:
Error when using SSH (Private key based) Credential
Error: Cannot parse privateKey: Encrypted PPK private key detected, but no passphrase given
at Client.connect (/usr/local/lib/node_modules/n8n/node_modules/ssh2/lib/client.js:243:13)
at /usr/local/lib/node_modules/n8n/node_modules/node-ssh/lib/cjs/index.js:193:24
at new Promise (<anonymous>)
at NodeSSH.connect (/usr/local/lib/node_modules/n8n/node_modules/node-ssh/lib/cjs/index.js:173:15)
at async Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Ssh/Ssh.node.js:300:17)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:424:47
Passphrase is filled in correctly and is verified as it works fine with Putty/Filezilla.
To be able to help you we need some additional information. Can you please tell us exactly the problem you are having and provide as much detail as possible? If you want to download a file what happens exactly? Does the node fail? If so, with what error? Does it crash? Does nothing happen at all? Is a file downloaded but the data invalid? …?
Because for me all is working perfectly fine.
Stack
Error: EACCES: permission denied, open '/tmp/prefix--7-AV1GxgHkzhr6'
Also, commands are executing fine.
Example, the command cat /root/Dockerfile produces the contents of the file as the output, as expected, but trying to download the doesn’t work.
The SSH node has to download the file to a temp location first and then read it in again (that is sadly how the library works). It seems like that the user n8n runs with does maybe have a permission issue with writing to the /tmp folder. Can you check if giving the user full access will solve that problem?
Should i map an additional /tmp volume in docker to achieve this?
I’m not sure how to change the n8n user’s permission, in this case.
Update:
I tried by mapping a new volume in the n8n container:
volumes:
- ./tmp:/tmp
Still getting the permission error.
Note: I also tried to verify user permissions by creating a new file, touch /tmp/new.txt, from the ‘Execute Command’ node, and was successful in doing so.
Did just try to reproduce the issue you face. After I tried to download a file with the default Docker image, instead of my normal default development environment, I did run into the exact same problem. I could identify the problem and fixed it. Will try to release a new version today or tomorrow with that fix. Will update you here once it is available.