Last active
October 15, 2019 08:16
-
-
Save yqt/2e1b0df3212db7f36124121f44591ec7 to your computer and use it in GitHub Desktop.
kill inactive ssh session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pstree -p | grep ssh | grep -v grep | awk -F '[()]' '{print $2}' | xargs -I {} sudo kill -9 {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment