jeroenpeeters / docker-ssh

SSH Server for Docker containers ~ Because every container should be accessible
GNU General Public License v2.0
637 stars 89 forks source link

docker-ssh crashes when using pycharm ssh client #2

Open tbeg opened 8 years ago

tbeg commented 8 years ago

In the shell ssh user@localhost -p 2222 works fine. Using the PyCharm ssh client to start a session kills the docker-ssh container with docker logs output:

NoAuthentication handler is handling the authentication! This is INSECURE! /usr/src/app/src/sessionHandler.coffee:97 return x = accept(); ^ TypeError: undefined is not a function at Session. (/usr/src/app/src/sessionHandler.coffee:79:11) at Session.emit (events.js:118:17) at SSH2Stream.onREQUEST (/usr/src/app/node_modules/ssh2/lib/server.js:596:16) at SSH2Stream.emit (events.js:107:17) at parse_CHANNEL_REQUEST (/usr/src/app/node_modules/ssh2/node_modules/ssh2-streams/lib/ssh.js:4361:8) at parsePacket (/usr/src/app/node_modules/ssh2/node_modules/ssh2-streams/lib/ssh.js:3732:12) at SSH2Stream._transform (/usr/src/app/node_modules/ssh2/node_modules/ssh2-streams/lib/ssh.js:555:13) at SSH2Stream.Transform._read as __read at SSH2Stream._read (/usr/src/app/node_modules/ssh2/node_modules/ssh2-streams/lib/ssh.js:213:15) at SSH2Stream.Transform._write (_stream_transform.js:167:12) at doWrite (_stream_writable.js:301:12) at writeOrBuffer (_stream_writable.js:288:5) at SSH2Stream.Writable.write (_stream_writable.js:217:11) at Socket.ondata (_stream_readable.js:540:20) at Socket.emit (events.js:107:17) at readableAddChunk (_stream_readable.js:163:16) at Socket.Readable.push (_stream_readable.js:126:10) at TCP.onread (net.js:538:20)

npm ERR! Linux 3.16.0-43-generic npm ERR! argv "node" "/usr/local/bin/npm" "start" npm ERR! node v0.12.7 npm ERR! npm v2.14.1 npm ERR! code ELIFECYCLE npm ERR! docker-ssh@1.0.0 start: ./node_modules/coffee-script/bin/coffee server.coffee npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the docker-ssh@1.0.0 start script './node_modules/coffee-script/bin/coffee server.coffee'. npm ERR! This is most likely a problem with the docker-ssh package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! ./node_modules/coffee-script/bin/coffee server.coffee npm ERR! You can get their info via: npm ERR! npm owner ls docker-ssh npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /usr/src/app/npm-debug.log

jeroenpeeters commented 8 years ago

Does it youse SFTP? SFTP is not yet implemented. I'm planning to do so this week. I'm not really into python, can you give directions how to reproduce? Please recommend me a Docker image that I can use that includes PyCharm and a simple file that would reproduce this problem so I can try it myself.

tbeg commented 8 years ago

Sorry, Pycharm is an python IDE (https://www.jetbrains.com/pycharm/)

Using the PyCharm integrated shell to start an docker-ssh session works fine. Using the PyCharm ssh dialog produces the error/kills the docker-ssh container...AFAIK it is PyCharm thats misbehaving starting the ssh session. Anyhow I thought that I better report the error....

I can provide you with my repo but you would still have to install PyCharm yourself. Better close the issue as "cannot reproduce" ?

Anyway It seems that PyCharm remote debugging (python interpreter in my container) needs SFTP. Now it fails with "Connection to 'localhost' failed. Failed to send channel request". As soon as you implement SFTP in docker-ssh I will be testing it!

jeroenpeeters commented 8 years ago

I'm currently working on an SCP implementation. Can you confirm that either PyCharm uses SFTP or SCP?

tbeg commented 8 years ago

afaik SFTP It seems there are third party plugins with scp support..I will check

borgdrone7 commented 7 years ago

Hi, I am having same problem (Failed to send channel request) with PhpStorm ssh, anyone found a solution? Thanks

dsalnikov commented 6 years ago

Hi, same problem with openssh for Windows.

virtimus commented 5 years ago

Hi there - I'm also stucked at sftp :) It would be great to have sftp access as I'm for instance trying to connect from linux/mint/nemo and browse container files from UI..

virtimus commented 5 years ago

Did a step into the direction - https://github.com/virtimus/docker-ssh/commit/ba587817b8158598ebc4aa4ec9b9bef90afd5499

baumannalexj commented 2 years ago

is this fixed for pycharm?