-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: All configured authentication methods failed #438
Comments
I've also tried this on more than one local machine and server. |
Hello! I do not see a password or a private key or a private key path configured in your connection parameters. When you use SSH CLI, it uses the SSH config (usually Please specify the private key path and try again and see if it works |
@steelbrain Hello! We have tried that as well. I've successfully connect manually with ssh and the key I tried in the privateKeyPath: '/Users/xxxx/.ssh/id_rsa_special_key' I've also verified that I haven't tried doing anything with the |
OK. So after digging through this issue form ssh2 I edited PubkeyAcceptedKeyTypes=+ssh-rsa |
I had the same issue: All configured authentication methods failed On my side, I succeeded by using SSH with the option -o 'IdentitiesOnly yes'. Is there a way to do the same with node-ssh in case of many identities ? Additional question, is there a way to debug the connection when using node-ssh ? |
Finally, found a solution on my side. SSH version used on the host is 8.9 (Ubuntu 22.04) which seems to be not compliant with #SSH2. Both solutions described worked for me:
|
You can use the option |
Sorry, I missed your comment @sonicparke. Got the same conclusion by digging on my own :-) |
FWIW: I was getting this being a doofus. I had generated a new key and was passing it correctly to the config object in my Node script but hadn't added the public key to the host server yet. |
Adding a dependency on a newer This change seems to be done in this project's main branch, but it's not yet released. |
Hello!
I'm trying to test out connecting to an EC2 instance with a simple script:
When doing so, I get the following:
However, I am able to ssh into this server directly:
Is there anything you can recommend for what might be causing the authentication methods to fail from node-ssh?
Many thanks!
The text was updated successfully, but these errors were encountered: