Browse Source

Add script to kill shh-agent's

ApisNecros 2 years ago
parent
commit
967bcc36a7
1 changed files with 11 additions and 0 deletions
  1. 11 0
      kill_ssh_agents

+ 11 - 0
kill_ssh_agents

@@ -0,0 +1,11 @@
+#!/bin/bash
+
+####
+# Kills all ssh-agents spawned by the current user
+####
+for ID in $(pgrep -u $(id -u) "ssh-agent")
+do
+   kill -9 "$ID"
+done
+
+echo "SSH Agents killed B)"