remote logoff question

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: KevinO
Date:  
Subject: remote logoff question
christian ruckdaschel wrote:
> I have a box at home running RedHat 8 that currently has root logged
> on. I can logout root locally, but that wouldn't answer my question,
> which is:
>
> If root is logged on locally is there a way to remotely logout root from
> the local session via ssh?
>


Ssh into the remote box as root or su to root.

Use the 'who' command to get the terminal line. (eg. vc/2 or pts/1)

A user on a local virtual console would be a vc/x ....

Now you can do a:

ps auxw | grep vc/2

You will be able to get the PID of the bash shell that is running on that
terminal line. Now just

kill -9 xxxxx

where xxxxx is the PID of that particular bash process.

Type 'who' again to verify that they are now logged out...

This can all be done on one line, of course, but let's not start that again ;-)

- --
KevinO

Hickory Dickory Dock, The mice ran up the clock, The clock struck one, The
others escaped with minor injuries.