For some reason, I have a few open sessions on an SSH server that I don't know about. I assume they're leftovers from when my pipe broke.

$ users
user1 user2 user3 me me me me

Is there a way to log me out across all sessions?

3 Answers 3


You could try killing off the individual processes that are still running as you, or just purge the system of everything running as you: pkill -u username

  • 1
    This command kind of restarts the remote machine and all the opened programs get closed. We are only interested in closing the multiple connections.. Feb 18 at 19:44
loginctl terminate-user <Your User Name>

should kill all sessions of your user

  • 4
    It worked! All SSH sessions are logged out =)
    – Megidd
    Jul 15, 2021 at 2:11
# ps -ea | grep username

kill -9 id's

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .