LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   logout another ssh user (https://www.linuxquestions.org/questions/linux-newbie-8/logout-another-ssh-user-425906/)

dkrysak 03-17-2006 10:11 PM

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!

spooon 03-17-2006 10:27 PM

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

Matir 03-17-2006 10:42 PM

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


All times are GMT -5. The time now is 01:56 AM.