Click to See Complete Forum and Search --> : Killing an SSH session...


Grimster
09-22-2002, 05:30 AM
Is it possible to drop a SSH session? eg: I have a server which i remote admin via SSH, and user #2 logs in, can i log him out and drop the session via SSH logged in thru SSH from my machine?

Breakdown - J
09-22-2002, 06:34 AM
This is what i think you are asking, please correct me if I'm wrong. You are ssh'd into a box . . . Somone else connects with ssh . . . you want them gone . . .

run this

netstat -anp

you will see an IP address of said person (and you etc. . . . ) Also you'll see a PID (process ID). When you figure out (and there are many ways to do this, look for SSH then figure out who is not you) which IP that person is coming from, match it to the PID and type this command

kill PID i.e.

kill 4094

they are gone, but will be back

Grimster
09-22-2002, 08:16 AM
cool, works like a charm :)

btw, once their kicked i can just disable their account so they won't be comin back :)