SSH Key not working

Describe the problem/error/question

Hello I am trying to establish an ssh connection, I add an ssh credentials with an ssh key, no matter what I enter the following error occurs as described below.

What is the error message (if any)?

Couldn’t connect with these settings
SSH connection failed: config.privateKey does not exist at given fs path

Please share your workflow

Share the output returned by the last node

config.privateKey does not exist at given fs path

Information on your n8n setup

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

Hi @Alessio,

2 things.

  1. I cannot see how you set your credentials up, but I can see that it says SSH Password account, just confirming that is correctly the name of your Key credential.

  2. See here: SSH credentials | n8n Docs

You’re private key must be pasted raw into the Private Key field, you are not specifying some kind of path or remote URL. (if that’s what you may be attempting)

2 Likes

I paste the private key in the field privatekey, this is a example key.

PuTTY-User-Key-File-3: ssh-rsa
Encryption: none
Comment: rsa-key-20240509
Public-Lines: 6
AAAAB3NzaC1yc2EAAAADAQABAAABAQC4OZzUPlZdAaRaoUzEno4zB44DEoBSe0mj
BPj1l+D6ne/noNDcaNvNqmswh5R0WS90HF8yWQNhWB84W/g77ZmrMzL+S7591cvJ
sZKMJ7VXbj02PlJS0Ls2iSAKpXMorv2U95p1M1MJSYWet8HXLj7UoL0QrpEKniUI
/dTJiz4TqocAOjv8VzaoXU6wxfnRXacx39n0nRVFmAXhtXIqeYnxpbMzMEQ5CTWo
BREALX6FJ8ULlcHbnItipDU3SqXF4cmnYAUMrQizMAFSuWb3d/mUTohkj4/qYqGv
8YVhKqYdZYg8OloCAYh0ICi0e9Z+W3xz8r/319NgtRi+clCmCIM5
Private-Lines: 14
AAABAHg5WOiF2fSOSsS+eQvjcWdJ6dqFa2rofFC/wPz9ZdwHz/U4VLVSVQdtzM/5
2t7nCPncPh/sSTFwwccU9fWeBGfeXMvpgGI8cOaqVLnUfBqXnajVmQHkqBhZ+qgX
+wQ01tYtlAYiPXFVIrdGsmCMFILMdzX4xjzIoeCxTflNPnCz/Wh3InhWm6BsC4DA
DaUH5LqljeZir+s4BcwrSSrBxU0DT3ZX9m50acrx0yBVcHwj3kFAxOL5eievpaXz
ZvlDnK3mTFG/d//RNDHdQnzM80tEE/y6LGofmjUT4snAz8ynT3cPRUhG3fOcV5pd
1Q+30FLRcpdtMPH8NiBKdCfJEjUAAACBAPocgezBAwuA81gEBzYhtMIs8I7auWRx
Ufx9BN1+0/9ZPtT4IKLPyF7x9lRc/9h9BJDKHrgxUFfp1+uekoGaDInk5WX6zaBu
RPQF9r0Zd4u6NHkLmVUtqoYilZGrqGBb3LXvQKSsv7JNlRN4vhS+WvlQJCDX4RyW
od1mqqQK11OPAAAAgQC8j/1RgOMyG+3vfLyqxHZuW0zGHMn39pDQs79mMRQ4uZg0
dLrt0839nZ7XP6bRKS6g28fd9y/jYIJqqeXWDfkdiWTfzFzYDi2hVJS3M+3QLUUk
ojUKvI0tNjUo6uWw0ww8T2nE/oMoD60m5hP9TEIjfEnMNaCHzpZdWCXKMqO4twAA
AIBpOJhgg5Wlxevxcr3IuKy0LF+F0pdJGodMxbNVTGr57Fe/Vhl/OWDAxn3fHu48
c4AMNXEWQbmbkYZkKh0bz3otmcfYnuJMP/ViGRDkVpb9dvaJmokyHbTBzARlYNSD
v4fa5V88nrTuq9HnTeZ9ex3I9ly0fB5NSggPPMoi2Odppg==
Private-MAC: 4c39ebe7f81b6a3eaf7c3c52e12d39b75bac47c56614a55e33ee28b055857617

You should only be inputting the private key half of what you sent an example of.

Are you just pasting all that? Try just after private-lines. Also I cannot attest to this, but it may also not support private-mac feature.

The reason it shows a filesystem not found error, my assumption, is that SSH node pipes the pasted data into a file before processing with something like openssl.

I pasted this:

AAABAHg5WOiF2fSOSsS+eQvjcWdJ6dqFa2rofFC/wPz9ZdwHz/U4VLVSVQdtzM/5
2t7nCPncPh/sSTFwwccU9fWeBGfeXMvpgGI8cOaqVLnUfBqXnajVmQHkqBhZ+qgX
+wQ01tYtlAYiPXFVIrdGsmCMFILMdzX4xjzIoeCxTflNPnCz/Wh3InhWm6BsC4DA
DaUH5LqljeZir+s4BcwrSSrBxU0DT3ZX9m50acrx0yBVcHwj3kFAxOL5eievpaXz
ZvlDnK3mTFG/d//RNDHdQnzM80tEE/y6LGofmjUT4snAz8ynT3cPRUhG3fOcV5pd
1Q+30FLRcpdtMPH8NiBKdCfJEjUAAACBAPocgezBAwuA81gEBzYhtMIs8I7auWRx
Ufx9BN1+0/9ZPtT4IKLPyF7x9lRc/9h9BJDKHrgxUFfp1+uekoGaDInk5WX6zaBu
RPQF9r0Zd4u6NHkLmVUtqoYilZGrqGBb3LXvQKSsv7JNlRN4vhS+WvlQJCDX4RyW
od1mqqQK11OPAAAAgQC8j/1RgOMyG+3vfLyqxHZuW0zGHMn39pDQs79mMRQ4uZg0
dLrt0839nZ7XP6bRKS6g28fd9y/jYIJqqeXWDfkdiWTfzFzYDi2hVJS3M+3QLUUk
ojUKvI0tNjUo6uWw0ww8T2nE/oMoD60m5hP9TEIjfEnMNaCHzpZdWCXKMqO4twAA
AIBpOJhgg5Wlxevxcr3IuKy0LF+F0pdJGodMxbNVTGr57Fe/Vhl/OWDAxn3fHu48
c4AMNXEWQbmbkYZkKh0bz3otmcfYnuJMP/ViGRDkVpb9dvaJmokyHbTBzARlYNSD
v4fa5V88nrTuq9HnTeZ9ex3I9ly0fB5NSggPPMoi2Odppg==

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