LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 07-19-2005, 10:27 AM   #1
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 232
Blog Entries: 1

Rep: Reputation: 17
Kick existing connected users


Through the "who" command, I can see that someone is connected to my machine (I allowed the ssh connection a week ago), but now I'm ready for him to disconnect. Is there a command that will immediately disconnect this user from my box?

Thanks,
LoadedMind
 
Old 07-19-2005, 10:38 AM   #2
mhallbiai
Member
 
Registered: Jun 2005
Posts: 96

Rep: Reputation: 15
who returns pts number
example: joeuser pts/5
ps aux | grep pts\/5 | grep -v grep
example: joeuser 4452 ... pts/5 ... /bin/bash
kill -9 4452

hope this helps
 
Old 07-19-2005, 01:38 PM   #3
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 232
Blog Entries: 1

Original Poster
Rep: Reputation: 17
Thanks! That's exactly what I was looking for. I understood the majority of that command, with the exception of pts\/



Regards,
LoadedMind
 
Old 07-19-2005, 04:47 PM   #4
mhallbiai
Member
 
Registered: Jun 2005
Posts: 96

Rep: Reputation: 15
the \ is necessary to escape the / (tell grep that we are looking for the '/' character
 
Old 07-26-2005, 08:55 AM   #5
loadedmind
Member
 
Registered: Sep 2003
Location: Texas
Distribution: Red Hat/CentOS
Posts: 232
Blog Entries: 1

Original Poster
Rep: Reputation: 17
Ah! Thanks!
 
  


Reply


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
How to list existing users? stefaandk Linux - Newbie 11 04-03-2006 02:03 AM
Convient & policte way to kick users off system? mattengland Linux - Security 15 10-04-2005 09:20 AM
Install with existing users?? Okie2003 MEPIS 6 06-02-2005 05:39 PM
List existing users anand_kt Linux - Newbie 3 02-28-2005 08:18 AM
Kick and log users on SSH Quantum0726 Linux - Security 5 01-02-2004 10:10 AM


All times are GMT -5. The time now is 05:52 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration