LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-03-2002, 04:30 AM   #1
babroga
LQ Newbie
 
Registered: Mar 2002
Posts: 2

Rep: Reputation: 0
Question dead ssh sessions


Sometimes, when I use ssh to log into my Linux box from Windows (puTTY program), it happens that Win crashes and then I lose my ssh connection.

Then I have to reconnect and log in again. But, when I check who is logged by who command, I see not only my current session, but also the old one (the one that I lost before due to Win crash)...

It looks like two users are on, but there is only one actually.

What to do now? How to remove the old session - or how to reuse it, if possible?

TIA
babroga
 
Old 03-03-2002, 04:57 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://www.linuxquestions.org/questi...threadid=15467
please don't double post
 
Old 03-03-2002, 04:57 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://www.linuxquestions.org/questi...threadid=15467
please don't double post
 
Old 03-03-2002, 06:43 PM   #4
Tekime
Member
 
Registered: Feb 2002
Location: East Coast USA
Distribution: Slackware
Posts: 53

Rep: Reputation: 15
Do ps aux|grep username

This will list all the PID (Process IDs) created by the user

Look for "-bash" (or whatever your shell is) in the last column, should be two open since you are logged in twice.

Note the PID (second column from the left) of the shell then do kill -9 PID, where PID is the PID number you found.

That'll kill the users shell. Only way I know how
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[priv] in SSH Sessions stefaandk Linux - Security 2 09-22-2006 12:05 PM
SSH help, concerning sessions frokid879 Linux - Newbie 4 11-11-2005 11:22 AM
Dead fisical connections, with telnet sessions. dryajov Linux - Networking 0 01-21-2005 10:41 AM
SSH sessions locked to one program jav Linux - Software 2 11-17-2004 10:06 AM
dead ssh sessions babroga Linux - Newbie 1 03-03-2002 08:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration