Solved

Immortal SSH Session

Posted on 2014-09-12
5
178 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 61

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 61

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 61

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now