[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Quick question


And below are the logs of the SSHD. These are the logs of the request and after that the first forwarding channel coming in and after that a few failing attempts. I don't know if it looks like this when the channels are properly closed, but it does contain the lines channel2: free. Sounds like the channels get closed. I have also tried reopening the connection over an SSH tunnel created with Plink, but the logs look the same.
Kind regards,Lars van Ruiten
Oct  9 10:46:45 vnc-server sshd[16261]: debug1: server_input_global_request: rtype tcpip-forward want_reply 1Oct  9 10:46:45 vnc-server sshd[16261]: debug1: server_input_global_request: tcpip-forward listen  port 5905Oct  9 10:46:45 vnc-server sshd[16261]: debug1: Local forwarding listening on 0.0.0.0 port 5905.Oct  9 10:46:45 vnc-server sshd[16261]: debug1: channel 0: new [port listener]Oct  9 10:46:45 vnc-server sshd[16261]: debug1: Local forwarding listening on :: port 5905.Oct  9 10:46:45 vnc-server sshd[16261]: debug1: channel 1: new [port listener]Oct  9 10:46:47 vnc-server sshd[16261]: debug1: Connection to port 5905 forwarding to  port 0 requested.Oct  9 10:46:47 vnc-server sshd[16261]: debug1: channel 2: new [forwarded-tcpip]Oct  9 10:46:53 vnc-server sshd[16261]: debug1: channel 2: free: forwarded-tcpip: listening port 5905 for  port 0, connect from xxx.xxx.xxx.xxx port 40004 to xxx.xxx.xxx.xxx port 5905, nchannels 3Oct  9 10:46:56 vnc-server sshd[16261]: debug1: Connection to port 5905 forwarding to  port 0 requested.Oct  9 10:46:56 vnc-server sshd[16261]: debug1: channel 2: new [forwarded-tcpip]Oct  9 10:46:57 vnc-server sshd[16261]: debug1: channel 2: free: forwarded-tcpip: listening port 5905 for  port 0, connect from xxx.xxx.xxx.xxx port 49752 to xxx.xxx.xxx.xxx port 5905, nchannels 3Oct  9 10:46:58 vnc-server sshd[16261]: debug1: Connection to port 5905 forwarding to  port 0 requested.Oct  9 10:46:58 vnc-server sshd[16261]: debug1: channel 2: new [forwarded-tcpip]Oct  9 10:46:59 vnc-server sshd[16261]: debug1: channel 2: free: forwarded-tcpip: listening port 5905 for  port 0, connect from xxx.xxx.xxx.xxx port 34146 to xxx.xxx.xxx.xxx port 5905, nchannels 3Oct  9 10:46:59 vnc-server sshd[16261]: debug1: Connection to port 5905 forwarding to  port 0 requested.Oct  9 10:46:59 vnc-server sshd[16261]: debug1: channel 2: new [forwarded-tcpip]Oct  9 10:47:00 vnc-server sshd[16261]: debug1: channel 2: free: forwarded-tcpip: listening port 5905 for  port 0, connect from xxx.xxx.xxx.xxx port 37533 to xxx.xxx.xxx.xxx port 5905, nchannels 3Oct  9 10:47:00 vnc-server sshd[16261]: debug1: Connection to port 5905 forwarding to  port 0 requested.Oct  9 10:47:00 vnc-server sshd[16261]: debug1: channel 2: new [forwarded-tcpip]Oct  9 10:47:01 vnc-server sshd[16261]: debug1: channel 2: free: forwarded-tcpip: listening port 5905 for  port 0, connect from xxx.xxx.xxx.xxx port 26896 to xxx.xxx.xxx.xxx port 5905, nchannels 3

From: larsvanruiten@xxxxxxxxxxx
To: libssh@xxxxxxxxxx
Subject: RE: Quick question
Date: Fri, 9 Oct 2015 08:25:12 +0000




Yes debugging is enabled and this is the part of the log after I close the VNC client. It seems like it detects that the client has closed the connection and the channel is closed properly.
         

Kind regards,Lars van Ruiten
> From: asn@xxxxxxxxxxxxxx
> To: libssh@xxxxxxxxxx
> Subject: Re: Quick question
> Date: Thu, 8 Oct 2015 18:43:53 +0200
> 
> On Thursday 08 October 2015 14:06:34 lars van ruiten wrote:
> > Allright after studying the RFC's again I believe that this is the right way
> > to do it: 1. Start SSH session2. Request listening on remote port3. While
> > Forever        1. Wait untill incoming channel and load in an ssh_channel  
> >      2. while connection not closed                  1. Read reverse
> > channel and write to Local Socket                  2. Read Local socket and
> > write to reverse channel        3. Close Channel That is exactly what my
> > while loop does. After I have closed the channel it starts waiting for a
> > new one. When a connection arrives my code continues to the loop where it
> > starts forwarding the data between the channel and the socket, but there
> > there never seems to be any data on the channel. This has kept me occupied
> > for over a day now, and it's really weird that everything works fine on the
> > first connection but not on the second. If I am missing a step in the list
> > above please tell me. If there is a mistake in my code I will probably be
> > able to figure it out myself. Kind regards, Lars van Ruiten
> 
> Did you enable debug on the server side to see if the channel is really 
> closed?
> 
> 
 		 	   		   		 	   		  

References:
Quick questionlars van ruiten <larsvanruiten@xxxxxxxxxxx>
Re: Quick questionAndreas Schneider <asn@xxxxxxxxxxxxxx>
RE: Quick questionlars van ruiten <larsvanruiten@xxxxxxxxxxx>
Re: Quick questionAndreas Schneider <asn@xxxxxxxxxxxxxx>
RE: Quick questionlars van ruiten <larsvanruiten@xxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org