[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [suse-security] Close all ssh sessions

> How can one force closing an open ssh session ? I want to disconnect a 
> user right after executing a script no waiting for a timeout. Is that 
> possible ?
> Thanx
> Miguel Albuquerque
> Network Administrator

I'd suggest something like the following:
netstat -anp|awk '/ESTAB/ {
        split($5,a,":"); if(a[2] = "22" ) then split($7,b,"/"); print b[1];endif;  
        {next;}' | xargs kill -15


Check the headers for your unsubscription address
For additional commands, e-mail: suse-security-help@xxxxxxxx
Security-related bug reports go to security@xxxxxxx, not here