fusfu / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

After login to shellinaboxd, subsequent ssh to NetBSD machine causes disconnect after login. #189

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
shellinabox is installed on an Ubuntu 12.04 web server.  I am able to log into 
said webserver no problem from my browser.  From the command line of the 
webserver, if I then ssh to another host running the NetBSD operating system, 
the distant sshd receives an eof and logs me off immediately after displaying 
the remote /etc/motd:

------
. . . 
debug2: shell request accepted on channel 0                                     

Last login: Thu May 17 08:13:38 2012 from 192.168.34.3                          

NetBSD 5.0.2 (GENERIC) #0: Tue Oct 19 16:22:51 EDT 2010                         

Welcome to NetBSD!                                                              

debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0           

debug2: channel 0: rcvd eof                                                     

debug2: channel 0: output open -> drain                                         

debug2: channel 0: obuf empty                                                   

debug2: channel 0: close_write                                                  

debug2: channel 0: output drain -> closed                                       

debug2: channel 0: rcvd close                                                   

debug2: channel 0: close_read                                                   

debug2: channel 0: input open -> closed                                         

debug3: channel 0: will not send data after close                               

debug2: channel 0: almost dead                                                  

debug2: channel 0: gc: notify user                                              

debug2: channel 0: gc: user detached                                            

debug2: channel 0: send close                                                   

debug2: channel 0: is dead                                                      

debug2: channel 0: garbage collecting                                           

debug1: channel 0: free: client-session, nchannels 1                            

debug3: channel 0: status: The following connections are open:                  

  #0 client-session (t4 r0 i3/0 o3/0 fd -1/-1 cc -1)                                                                                                     

Connection to mail closed.                                                      

Transferred: sent 2560, received 2320 bytes, in 0.2 seconds                     

Bytes per second: sent 10351.3, received 9380.9                                 

debug1: Exit status -1                                                          

-----

It makes no difference if I ssh to any number of non-NetBSD machines in a 
chain.  For example, I can log into the shellinabox host, then ssh to linux1, 
then to linux2, then to linux3, and finally to NetBSD1 and I still get 
disconnected in the above manner.   The problem also exists if I invoke 
shellinaboxd with "--service=/:SSH:mail".

If I ssh to the shellinabox host from another ssh client (not shellinabox 
through a browser), I can then ssh to the NetBSD hosts with no issue.

I can work around this issue by pre-configuring an active ssh session to my 
NetBSD hosts within a 'screen' session, and connect to this 'screen' session 
after logging into the shellinabox host but over the long run, that will be 
sub-optimal.

I am willing to help with debugging.  

Original issue reported on code.google.com by hpey...@beer.org on 17 May 2012 at 12:31