FG

How can I logout an open, remote SSH session?

Fresh3 days ago
Mar 15, 202692034 views
Confidence Score1%
1%

Problem

I sshed into a Linux machine (bash shell) from a public Windows machine (in our lab) and forgot to log out. I'm now back at my seat in another room and I am too lazy to walk back and log out that session; I can ssh into the Linux machine from my current PC though. Can I force-logout the other session from a new SSH session? When I ssh to the Linux box from my current PC and type command, I can see that I'm still logged in there; my name is listed twice - one for the current session and another for the session from lab PC. I don't have root privileges on the said machine, but I guess that shouldn't matter as I'm just trying to log out myself.

Error Output

users

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I logout an open, remote SSH session?

Low Risk

Run on your current session, to find out on which tty you are working, so you do not log yourself out from current session. Run to show you current users and associated pseudo-terminals(tty). Assuming that you are logged twice and there are no other users on your ssh server, your previous ssh session will be on and current on . To ditch the session on simply kill processes that are associated to it with

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment