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/

Reply via email to