Linux: Log off a user remotely via ssh

May this is useful, if you’ve forgotten to log off from a system, which you can now only reach via ssh.

sudo kill -9 $(ps -U  -o "pid=")