Solved

Immortal SSH Session

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
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 …
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

708 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

12 Experts available now in Live!

Get 1:1 Help Now