LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-17-2006, 10:11 PM   #1
dkrysak
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?

Thanks!
 
Old 03-17-2006, 10:27 PM   #2
spooon
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
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

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


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
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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:00 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