How can I logout an open, remote SSH session?
Run tty
on your current session, to find out on which tty you are working, so you do not log yourself out from current session. Run w
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 pts/0
and current on pts/1
. To ditch the session on pts/0
simply kill processes that are associated to it with
pkill -9 -t pts/0
Assuming you don't have any other processes you don't want to be 86'ed, you can just do:
$ ssh <systemname> pkill -u <yourlogin>
And the other session will go away.