SSH Node ERROR: All configured authentication methods failed

I’m using the right private key, Still getting this error. What could be the issue?

Version: 0.144.0

Hey @mcnaveen,

Normally I would say the key could be wrong (maybe wrong format) or the server is not configured for key based authentication.

What I would do depending on the SSH server is enable debug logging on the server side and see what that shows and maybe see if password auth works.

1 Like

This is really strange. I’m trying to access the same host machine where n8n is running on docker.

This is what I’m getting on ssh auth log. 172.1.0.10 is n8n docker ip

Oct 28 07:50:30 sitorg-falkenstein sshd[1847359]: Received disconnect from 172.1.0.10 port 60158:11:  [preauth]
Oct 28 07:50:30 sitorg-falkenstein sshd[1847359]: Disconnected from authenticating user root 172.1.0.10 port 60158 [preauth]

Edit: I tried a different user too. Instead of root still the same issue.

Is that with debug enabled in the sshd_config?

Yes bro. I have enabled the debug too.

1 Like

In that case I will be home in about 30 minutes and I will give it a test :slightly_smiling_face:

Alright @mcnaveen

Given it a test on 144 with a private key and it is working as expected.

I suspect this could be something with the settings of your SSH server, Have you tried connecting to a different SSH server to see if that works just to narrow down the issue?

Good morning!

I have the same problem here with 3 SSH-connections. In my investigation for the cause I could determine all affected server has installed Ubuntu 22.04 with openssh 8.8.

For Docker-Backup sometimes I connect via WinSCP to these servers and there I had similar problems while connecting. After research I found possible reason.

In openssh 8.8 ssh-rsa become disabled. After I activate this in sshd_config I have no problems.

Is there a better solution as to enable a deprecated algorithm?

Thanks - Axel

1 Like

Hey @roru2k20,

Welcome to the community :rocket:

That is a great find and looks like it could be a cause, I will need to check the library we use for our SSH connections but it could be that it needs to be updated or a config change is needed.

1 Like

Hi, this solution work for me. [sftp] All configured authentication methods failed · Issue #37 · liximomo/vscode-sftp · GitHub.

key type ssh-rsa not in PubkeyAcceptedAlgorithms

which lead to a solution by adding,

PubkeyAcceptedKeyTypes=+ssh-rsa

in /etc/ssh/sshd_config and restart sshd.

Seems newer Ubuntu 22.04 has changed default accepted key types and this plugin no longer worked despite ssh command working fine.

1 Like