docker-ssh icon indicating copy to clipboard operation
docker-ssh copied to clipboard

Disconnected: No supported authentication methods available (server sent: )

Open jcbrasuell opened this issue 9 years ago • 4 comments

Hi - I received the following error messsage after entering a user name at the SSH shell prompt.

Disconnected: No supported authentication methods available (server sent: )

Here is the docker run command: docker run -dit -e CONTAINER=test -e AUTH_MECHANISM=publicKey -e AUTHORIZED_KEYS=authorized_keys --name docker-ssh -p 2222:22 -v authorized_keys:/authorized_keys -v /var/run/docker.sock:/var/run/docker.sock jeroenpeeters/docker-ssh

I did copy my authorized_keys file to the docker volume.

btw: I assume the user has to be root with the default image?

[opc@dockerdb ~/docker-ssh]$ docker logs 0a

[email protected] start /src ./node_modules/forever/bin/forever -c ./node_modules/coffee-script/bin/coffee server.coffee | ./node_modules/bunyan/bin/bunyan

warn: --minUptime not set. Defaulting to: 1000ms warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms [2016-10-19T22:47:01.048Z] INFO: webserver/33 on 0a2199525555: Listening (host=::, port=8022) [2016-10-19T22:47:01.050Z] INFO: sshServer/33 on 0a2199525555: Docker-SSH ~ Because every container should be accessible [2016-10-19T22:47:01.051Z] INFO: sshServer/33 on 0a2199525555: Listening (host=0.0.0.0, port=22) [2016-10-19T22:47:18.735Z] INFO: sshServer/33 on 0a2199525555: Client connected (clientIp=24.55.18.151) events.js:160 throw er; // Unhandled 'error' event ^

Error: No supported authentication methods available at onDISCONNECT (/src/node_modules/ssh2-streams/lib/ssh.js:2029:15) at SSH2Stream. (/src/node_modules/ssh2-streams/lib/ssh.js:178:5) at emitMany (events.js:127:13) at SSH2Stream.emit (events.js:201:7) at parsePacket (/src/node_modules/ssh2-streams/lib/ssh.js:3462:10) at SSH2Stream._transform (/src/node_modules/ssh2-streams/lib/ssh.js:551:13) at SSH2Stream.Transform._read (_stream_transform.js:167:10) at SSH2Stream._read (/src/node_modules/ssh2-streams/lib/ssh.js:212:15) at SSH2Stream.Transform._write (_stream_transform.js:155:12) at doWrite (_stream_writable.js:307:12) at writeOrBuffer (_stream_writable.js:293:5) at SSH2Stream.Writable.write (_stream_writable.js:220:11) at Socket.ondata (_stream_readable.js:555:20) at emitOne (events.js:96:13) at Socket.emit (events.js:188:7) at readableAddChunk (_stream_readable.js:172:18) at Socket.Readable.push (_stream_readable.js:130:10) at TCP.onread (net.js:542:20)

error: Forever detected script exited with code: 1 error: Script restart attempt #1 [2016-10-19T22:47:23.399Z] INFO: webserver/39 on 0a2199525555: Listening (host=::, port=8022) [2016-10-19T22:47:23.403Z] INFO: sshServer/39 on 0a2199525555: Docker-SSH ~ Because every container should be accessible [2016-10-19T22:47:23.403Z] INFO: sshServer/39 on 0a2199525555: Listening (host=0.0.0.0, port=22)

jcbrasuell avatar Oct 19 '16 23:10 jcbrasuell

We've the same problem with it, when we use putty on windows with the correct key file.

robincle avatar Jul 14 '17 13:07 robincle

It also doesn't work with simpleAuth or multiAuth :( same error. Works fine with SSH, but not with putty

bezysoftware avatar Sep 26 '17 11:09 bezysoftware

Same problem. I'll keep an eye on this issue and also see if I can find a solution. Since this is only a Putty problem there must be a setting somewhere...

ghost avatar Oct 16 '17 04:10 ghost

Maybe this is information is useful related to the underlying dependency mscdex/ssh2:

https://github.com/mscdex/ssh2/issues/235

ghost avatar Oct 16 '17 06:10 ghost