diff options
author | Timo Weingärtner <timo@tiwe.de> | 2013-06-20 15:54:30 +0200 |
---|---|---|
committer | Timo Weingärtner <timo@tiwe.de> | 2013-06-20 15:54:30 +0200 |
commit | 6064fef975a261aab7e92792c2a83687ae1fdb9e (patch) | |
tree | 3fce2c1fd0378555c759983a178984b5577b1ea8 | |
parent | 07557734129cd53acb5eff9d59b0d6144925e3e7 (diff) | |
download | ssh-agent-filter-6064fef975a261aab7e92792c2a83687ae1fdb9e.tar.gz |
afssh: add safeguard against empty or non-running ssh-agent
-rwxr-xr-x | afssh | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -31,6 +31,11 @@ usage () { exit } +if ! ssh-add -l > /dev/null; then + echo "no keys in your ssh-agent or ssh-agent not running" >&2 + exit 1 +fi + declare -a agent_filter_args if [ -x "${BASH_SOURCE%/*}/ssh-agent-filter" ]; then |