Solved

Immortal SSH Session

Posted on 2014-09-12
5
180 Views
Last Modified: 2014-09-15
Happy Friday!!!

I've got a little TurnKey Linux Debian Squeeze VM that I use for SFTP.  I had a user login and transfer a file the other day and now I can't seem to kill the session.  

I'm still a little shaky in Linux but here are the symptoms:
"#netstat - tanp" shows the user with an established connection with a PID/Program name of 2603/sshd
"#kill -term 2603" runs successfully but...
"#netstate -tanp" shows the foreign address in "TIME_WAIT" with an additional entry of "ESTABLISHED" with the same foreign address

So it looks like something is restarting.  I confirmed with the user that he's not actually connected.  

Also tried restarting ssh and also rebooting the VM several times.  

Any idea what's happening or how I can kill this?  

TIA!
0
Comment
Question by:ttist25
  • 3
  • 2
5 Comments
 
LVL 62

Accepted Solution

by:
gheist earned 500 total points
ID: 40319806
That is how TCP stack works. It will wait for other end to csend a packet and then it will close connection.
0
 
LVL 1

Author Comment

by:ttist25
ID: 40321038
any way for me to close it manually?  It's driving me nuts!  :P
0
 
LVL 62

Expert Comment

by:gheist
ID: 40321049
There is no socket. Kernel keeps parameters to let other end close correctly.
0
 
LVL 1

Author Closing Comment

by:ttist25
ID: 40323581
Thanks for the help Gheist.  It looks like there must be a timeout somewhere because the connection is gone as of booting the VM this morning.
0
 
LVL 62

Expert Comment

by:gheist
ID: 40323649
Anywhere between minutes and days.
two parameters seen by
# sysctl net | grep _tw_
control this (but documentation is contradictory at best,so best is to configure less...
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

827 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question