Skip to content
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

closed by remote host #51

Open
gumush opened this issue Aug 31, 2018 · 7 comments
Open

closed by remote host #51

gumush opened this issue Aug 31, 2018 · 7 comments

Comments

@gumush
Copy link

gumush commented Aug 31, 2018

docker run -d -p 2222:22
-v /var/run/docker.sock:/var/run/docker.sock
-e FILTERS={"name":["^/ufoym/deepo:all-py36-jupyter$"]}
-e AUTH_MECHANISM=simpleAuth
-e AUTH_USER=gumush -e AUTH_PASSWORD=1234
jeroenpeeters/docker-ssh

i've got this messages in no auth and simple auth with user mode too.

Connection to localhost closed by remote host.
Connection to localhost closed.

@virtimus
Copy link

Take a look into "docker logs [container name]"
You can also bring some debug output on (server.coffee):

options =
privateKey: fs.readFileSync keypath
debug: (str) ->
log.info 'ssh2Debug:', str

@lextiz
Copy link

lextiz commented Dec 21, 2018

Got very similar error the logs are:


> [email protected] start /usr/src/app
> ./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
[2018-12-21T08:45:28.114Z]  INFO: sshServer/33 on dc38db9760ba: Docker filter
    filter: {
      "name": [
        "^/444c3b6a64a6$"
      ]
    }
[2018-12-21T08:45:28.155Z]  INFO: webserver/33 on dc38db9760ba: Listening (host=::, port=8022)
[2018-12-21T08:45:28.156Z]  INFO: sshServer/33 on dc38db9760ba: Docker-SSH ~ Because every container should be accessible
[2018-12-21T08:45:28.156Z]  INFO: sshServer/33 on dc38db9760ba: Listening (host=0.0.0.0, port=22)
[2018-12-21T08:45:40.611Z]  INFO: sshServer/33 on dc38db9760ba: Client connected (clientIp=172.17.0.1)
[2018-12-21T08:45:40.690Z] ERROR: noAuthHandler/33 on dc38db9760ba: NoAuthentication handler is handling the authentication! This is INSECURE!
[2018-12-21T08:45:40.776Z]  INFO: sessionHandler/33 on dc38db9760ba: Opening shell
/usr/src/app/src/session-handler-factory.coffee:21
      for (i = j = 0, ref = length - text.length; 0 <= ref ? j <= ref : j >= ref; i = 0 <= ref ? ++j : --j) {
                                         ^

TypeError: Cannot read property 'length' of undefined
  at /usr/src/app/src/session-handler-factory.coffee:7:41
  at spaces (/usr/src/app/src/session-handler-factory.coffee:25:7)
  at header (/usr/src/app/src/session-handler-factory.coffee:13:34)
  at Session.<anonymous> (/usr/src/app/src/session-handler-factory.coffee:81:28)
  at emitTwo (events.js:106:13)
  at Session.emit (events.js:191:7)
  at SSH2Stream.onREQUEST (/usr/src/app/node_modules/ssh2/lib/server.js:653:16)
  at emitOne (events.js:96:13)
  at SSH2Stream.emit (events.js:188:7)
  at parse_CHANNEL_REQUEST (/usr/src/app/node_modules/ssh2-streams/lib/ssh.js:4356:8)
  at parsePacket (/usr/src/app/node_modules/ssh2-streams/lib/ssh.js:3727:12)
  at SSH2Stream._transform (/usr/src/app/node_modules/ssh2-streams/lib/ssh.js:551:13)
  at SSH2Stream.Transform._read (_stream_transform.js:167:10)
  at SSH2Stream._read (/usr/src/app/node_modules/ssh2-streams/lib/ssh.js:212:15)
  at SSH2Stream.Transform._write (_stream_transform.js:155:12)
  at doWrite (_stream_writable.js:331:12)
  at writeOrBuffer (_stream_writable.js:317:5)
  at SSH2Stream.Writable.write (_stream_writable.js:243: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:176:18)
  at Socket.Readable.push (_stream_readable.js:134:10)
  at TCP.onread (net.js:547:20)

error: Forever detected script exited with code: 1

@lextiz
Copy link

lextiz commented Dec 21, 2018

Used the container ID instead of the container name.

@shouldsee
Copy link

is there any update of this?

@javimosch
Copy link

Apparently, this error occurs when the container binding is not working.
Try using container id instead of the container name as mentioned above and it should not happen.

@chungyan5
Copy link

chungyan5 commented Nov 4, 2019

hi all,
i got this kind of error too. It is the error connecting containers between this ssh and objective container.

Finally, i change this container name syntax and works now ==> -e FILTERS={"name":["^/orig_container_name$"]}
It is my fault in syntax as all " instead.

Just sharing and reminder to new comer.

@kristijanPetr
Copy link

hi all,

I've had same issue and got it to work with this regex: FILTERS={\"name\":[\"^container-name\"]}
Someone may find it helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants