How can I logout an open, remote SSH session?
--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles
--
Chapters
00:00 How Can I Logout An Open, Remote Ssh Session?
00:46 Accepted Answer Score 83
01:19 Answer 2 Score 5
01:32 Thank you
--
Full question
https://superuser.com/questions/193168/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #ssh
#avk47
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------
Music by Eric Matyas
https://www.soundimage.org
Track title: Magical Minnie Puzzles
--
Chapters
00:00 How Can I Logout An Open, Remote Ssh Session?
00:46 Accepted Answer Score 83
01:19 Answer 2 Score 5
01:32 Thank you
--
Full question
https://superuser.com/questions/193168/h...
--
Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...
--
Tags
#linux #ssh
#avk47
ACCEPTED ANSWER
Score 83
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
ANSWER 2
Score 5
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.