I run in to it consistently when I start up our ftp server with vsftpd&. Always 
wondered if & had something to do with it.


-----Original Message-----
From: Linux on 390 Port [mailto:LINUX-390@VM.MARIST.EDU] On Behalf Of Mauro 
Souza
Sent: Tuesday, April 24, 2012 8:53 PM
To: LINUX-390@VM.MARIST.EDU
Subject: Re: SSH don't close session on logout

I tried to disable TCPKeepAlive, and got exactly the same results... And I
had nothing running on the box: I've restarted it, connected thru ssh, and
exited. And It hangs that 20 seconds like  before.
I did some research about ClientAliveInterval, and it looks unrelated. It
sends a keep-alive packet to client, so any firewall/packet filter on the
way will not flag the connection as stale and kill it. And when the client
does not respond to enough keep-alives, server can drop the connection.
I left the client today, and I will only be back next week. I intend to try
a ptrace/ltrace/strace logout, write to some file, and investigate...

Mauro
http://mauro.limeiratem.com - registered Linux User: 294521
Scripture is both history, and a love letter from God.


Em 24 de abril de 2012 19:06, Pedro Principeza <pedro...@br.ibm.com>escreveu:

> Mauro,
>
> Maybe ClientAliveInterval parameter on sshd_config can help you out with
> that, I believe.
>
> HTH.
>
> Regards,
> Pedro Principeza
>
>
>
> From:   Richard Troth <ri...@velocitysoftware.com>
> To:     LINUX-390@vm.marist.edu,
> Date:   24/04/2012 18:56
> Subject:        Re: SSH don't close session on logout
> Sent by:        Linux on 390 Port <LINUX-390@vm.marist.edu>
>
>
>
> I run into this all the time.  But I can't tell from your config and
> description if it is exactly the same.
>
> What programs did you run (or what services did you start) before exiting?
>
> I don't suspect the TCPKeepALive.  (Since you're trying to drop back
> to the intermediate host.)
> More likely, something is holding a file descriptor open on the remote
> end.  Could be "stdout" from a background process, for example.  (This
> is what I get: a background process or helper program continues to
> run.)
>
> I hope this helps.
>
> -- R;
> Rick Troth
> Velocity Software
> http://www.velocitysoftware.com/
>
>
> On Tue, Apr 24, 2012 at 4:55 PM, Mauro Souza <thoriu...@gmail.com> wrote:
> > Hi guys!
> >
> > I've got a strange unseen problem on a sles11 sp2 today, and even Google
> > couldn't help me. I connect to the machine, but when I issue an exit,
> ssh
> > does not closes the connection. I have to connect to a gateway machine
> > before I can connect to the guest:
> >
> > me ----> linuxgw -----> strange_ssh
> >
> > But as soon as I execute an 'exit' or a 'logout' or ^D, the screen
> hangs.
> > It hangs the microsecond I press enter. I have to use the '~.' escape
> > sequence to close the now dead connection from strange_ssh and return to
> > linuxgw.
> >
> > I started two connections to see if the exit is being processed, and it
> is:
> >
> > Before the exit:
> > strange_ssh:~ # w
> >  17:48:03 up 4 min,  2 users,  load average: 0.00, 0.00, 0.00
> > USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
> > root     pts/1     17:44   35.00s  0.05s  0.05s -bash
> > root     pts/2     17:47    0.00s  0.03s  0.00s w
> >
> > Then I issue an exit, and the term hangs:
> >
> > strange_ssh:~ # w
> >  17:48:48 up 4 min,  1 user,  load average: 0.00, 0.00, 0.00
> > USER     TTY        LOGIN@   IDLE   JCPU   PCPU WHAT
> > root     pts/2     17:47    0.00s  0.03s  0.00s w
> >
> > pts/1 is killed, but my terminal shows this (and is dead):
> > strange_ssh:/etc/ssh # exit
> >
> > Some 20 seconds later, I see a logout, and the message saying that I has
> > been disconnected.
> >
> > The question is: how to change this 20 second timeout to something
> faster,
> > as I always see everywhere?
> >
> > This is my sshd_config file (almost all default, I only changed UseDNS
> and
> > TCPKeepALive):
> > Protocol 2
> > PasswordAuthentication no
> > GSSAPIAuthentication no
> > UsePAM yes
> > AllowTcpForwarding yes
> > X11Forwarding yes
> > TCPKeepAlive yes
> > UseDNS no
> > Subsystem       sftp    /usr/lib64/ssh/sftp-server
> > AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY
> > LC_MESSAGES
> > AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
> > AcceptEnv LC_IDENTIFICATION LC_ALL
> >
> >
> > Thanks!
> >
> > Mauro
> > http://mauro.limeiratem.com - registered Linux User: 294521
> > Scripture is both history, and a love letter from God.
> >
> > ----------------------------------------------------------------------
> > For LINUX-390 subscribe / signoff / archive access instructions,
> > send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> > http://www.marist.edu/htbin/wlvindex?LINUX-390
> > ----------------------------------------------------------------------
> > For more information on Linux on System z, visit
> > http://wiki.linuxvm.org/
>
>
>
> --
> -- R;
> Rick Troth
> Velocity Software
> http://www.velocitysoftware.com/
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>
>
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or
> visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/
-----------------------------------------------------
Please see the following link for the BlueCross BlueShield of Tennessee E-mail 
disclaimer:  http://www.bcbst.com/email_disclaimer.shtm

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/

Reply via email to