I am able to see logged-in users via the who or last command.
How can I log off a particular user who login through SSH?
|
I am able to see logged-in users via the How can I log off a particular user who login through SSH? |
||||
|
|
|
kill its ssh session. Check them by
Second column gives you the PID. Then,
Hope this helps. ps: using the -9 flag will prevent things from stopping "graciously". |
|||||||||||||
|
|
I found this guys. Just replace USERNAME with the desired user session to be killed. kill -1 |
|||
|
|
echo 'who | cut -d " " -f1 | uniq | xargs skill -KILL -u' just put this to some local.stop file and make it run when system reboot or shutdown. its works perfectly for me for many years on many different systems, from gentoo to ubuntu. |
|||
|
|