Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-17-2006, 10:11 PM   #1
LQ Newbie
Registered: Sep 2004
Distribution: centos
Posts: 25

Rep: Reputation: 15
logout another ssh user

silly question...

when you have a remote shell on a system... and you get disconnected -- well the user is still logged in (as "top" shows) - How can I kill that rouge session?

Old 03-17-2006, 10:27 PM   #2
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Here's what I usually do:
* run "ps -fu $USER"
* find the processes that correspond to the previous login session
* look for one that says "sshd: blahblah" or "bash" or something like that
* find its PID
* do "kill <that number>"
* repeat if that did not kill all of them
Old 03-17-2006, 10:42 PM   #3
LQ Guru
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 125Reputation: 125
Also, this is usually unnecessary -- sessions will eventually time out on their own.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
user logout kills wlan connection Cor_Tauri Linux - Wireless Networking 1 07-22-2004 06:42 PM
user with no logout megalomania Linux - General 3 04-12-2004 04:58 AM
ssh logout dellcom1800 Linux - Networking 3 01-13-2004 07:29 PM
User logout problem computergeek84 Linux - General 12 11-12-2003 06:35 AM
Logout an X user. squashblossom Linux - Networking 1 04-01-2003 09:22 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:38 PM.

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