Solved

Immortal SSH Session

Posted on 2014-09-12
5
184 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
Suggested Courses

630 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