Skip to content

Instantly share code, notes, and snippets.

@guyhughes
Last active May 10, 2016 20:13
Show Gist options
  • Save guyhughes/c69d4ad130b12ed5afed3f25ee0ed6ed to your computer and use it in GitHub Desktop.
Save guyhughes/c69d4ad130b12ed5afed3f25ee0ed6ed to your computer and use it in GitHub Desktop.
Kill all ssh-agents by process id using POSIX-ish tools only (cygwin-friendly)
ps -s | grep ssh-agent | sed -re 's/^\s+([[:digit:]]+).*$/\1/' | xargs kill -TERM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment