Error: All configured authentication methods failed
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- authentication
Research direction
The report provides a Node.js connection script and a stack trace through node_modules/ssh2/lib/client.js; start by reproducing the connection with the shown options and comparing it with the working ssh command. Done would require identifying a reproducible node-ssh authentication or configuration cause and documenting a concrete fix or guidance.
Written by the indexing model from the issue text.
Description
Hello!
I'm trying to test out connecting to an EC2 instance with a simple script:
const { NodeSSH } = require('node-ssh')
const ssh = new NodeSSH()
ssh.connect({
host: 'ec<some-ip>.compute-1.amazonaws.com',
username: 'ubuntu'
}).then(function() {
return ssh.execCommand('cd /home/ubuntu/ && ls')
}).catch(function(err) {
console.log('error: ', err)
})
When doing so, I get the following:
Error: All configured authentication methods failed
at doNextAuth (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/client.js:803:21)
at tryNextAuth (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/client.js:993:7)
at USERAUTH_FAILURE (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/client.js:373:11)
at 51 (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/protocol/handlers.misc.js:337:16)
at Protocol.onPayload (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/protocol/Protocol.js:2025:10)
at ChaChaPolyDecipherBinding.decrypt (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/protocol/crypto.js:851:26)
at Protocol.parsePacket [as _parse] (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/protocol/Protocol.js:1994:25)
at Protocol.parse (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/protocol/Protocol.js:293:16)
at Socket.<anonymous> (/Users/me/Desktop/code/node-ssh-test/node_modules/ssh2/lib/client.js:713:21)
at Socket.emit (events.js:400:28) {
level: 'client-authentication'
}
However, I am able to ssh into this server directly:
ssh ubuntu@ec<some-ip>.compute-1.amazonaws.com
Is there anything you can recommend for what might be causing the authentication methods to fail from node-ssh?
Many thanks!
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from steelbrain/node-ssh
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
steelbrain/node-ssh#487 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
steelbrain/node-ssh#482 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
steelbrain/node-ssh#474 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
steelbrain/node-ssh#473 · 1 comment · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
steelbrain/node-ssh#472 ·
All issues in steelbrain/node-ssh
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
cli: `execCargoMetadata` decodes stdout per chunk, corrupting non-ASCII paths across pipe boundariesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 62/100
lingdojo/kana-dojo#34127 · 1 comment · 5 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
osmlab/name-suggestion-index#13104 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100