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

docker-ssh crashes when using pycharm ssh client

Open tbeg opened this issue 9 years ago • 9 comments

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! [email protected] start: ./node_modules/coffee-script/bin/coffee server.coffee npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] 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

tbeg avatar Oct 17 '15 22:10 tbeg

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.

jeroenpeeters avatar Oct 18 '15 10:10 jeroenpeeters

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!

tbeg avatar Oct 18 '15 11:10 tbeg

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

jeroenpeeters avatar Nov 04 '15 07:11 jeroenpeeters

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

tbeg avatar Nov 04 '15 08:11 tbeg

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

borgdrone7 avatar Oct 24 '16 10:10 borgdrone7

Hi, same problem with openssh for Windows.

dsalnikov avatar Jun 11 '18 09:06 dsalnikov

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 avatar Oct 28 '18 09:10 virtimus

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

virtimus avatar Oct 28 '18 20:10 virtimus

is this fixed for pycharm?

baumannalexj avatar Jul 29 '21 23:07 baumannalexj