When working as system administrator in Linux, might need to forcefully disconnect user from SSH connection. One of the reasons to do that is when suspicious user is detected which acting maliciously. This tutorial demonstrates how to force user to disconnect from SSH connection in Linux.
In Linux, the
killall command can be used to kill processes. The
-u option allows to kill only processes the specified user owns. For example, the following command allows to disconnect user
john from SSH connection by killing all processes owned by that user:
sudo killall -u john
Leave a CommentCancel reply