#!/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)"