Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 186
  • Last Modified:

Immortal SSH Session

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
ttist25
Asked:
ttist25
  • 3
  • 2
1 Solution
 
gheistCommented:
That is how TCP stack works. It will wait for other end to csend a packet and then it will close connection.
0
 
ttist25Author Commented:
any way for me to close it manually?  It's driving me nuts!  :P
0
 
gheistCommented:
There is no socket. Kernel keeps parameters to let other end close correctly.
0
 
ttist25Author Commented:
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
 
gheistCommented:
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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now