close ssh sessions

Posted by egor7 on Server Fault See other posts from Server Fault or by egor7
Published on 2012-08-29T12:46:04Z Indexed on 2012/08/30 9:41 UTC
Read the original article Hit count: 165

Filed under:

I'm using ~/.ssh/config for logging to the internal.local corporate server:

Host internal.local
    ProxyCommand ssh -e none corporate.proxy nc %h %p

But after closing session (typing exit), my sshd session on server stays still active (I see it through different connection).

Hot do I close session or change my config in the appropriate way, to eleminate hang sessions?

First check from the second, root session: ps -fu user_name

user_name 861   855   0 16:58:16 pts/3       0:00 -bash
user_name 855   854   0 16:58:13 ?           0:00 /usr/lib/ssh/sshd

After logging out:

user_name 855   854   0 16:58:13 ?           0:00 /usr/lib/ssh/sshd

Just after scp files to/from the internal.local a new scp sessions still hangs on the server.

© Server Fault or respective owner

Related posts about ssh