[K12OSN] log off users via ssh?

Dan Young dan_young at parkrose.k12.or.us
Thu Mar 10 16:34:31 UTC 2005


On Thu, 2005-03-10 at 16:23 +0000, Brian Chivers wrote:
> Dan Young wrote:
> > On Thu, 2005-03-10 at 08:54 -0600, Greg Hovland wrote:
> >> Is there a way to log off users that are not suppose to be logged.
> >>
> >> This would be done from a remote site, possibly via ssh.
> >
> > The BOFH method is 'pkill -u username', where username is the user you
> > want to "log off."
> 
> Do a ps -aux | grep sshd will give you a list of ssh processes then you
> could do a kill -9 `pid` ?
> 
> You could script this to look for unauthorised users then kill them
> automagically, run this as a cron job and your away.
> 
> Not sure how to do the script but wouldn't be too hard.

Maybe I misunderstood, but I don't think he's looking to log off ssh
users, I think he's looking to log off users via ssh (i.e. remotely,
from a command line.)

-- 
Dan Young <dan_young at parkrose.k12.or.us>
Parkrose School District




More information about the K12OSN mailing list