From eec0ce51a048ffa700a92bdd3302d4fa9f5c3859 Mon Sep 17 00:00:00 2001 From: Markus Friedl Date: Fri, 15 Feb 2002 10:15:14 +0000 Subject: delete agent keys, too --- regress/usr.bin/ssh/agent.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'regress/usr.bin/ssh') diff --git a/regress/usr.bin/ssh/agent.sh b/regress/usr.bin/ssh/agent.sh index dc127885f1d..900eaa2c89c 100644 --- a/regress/usr.bin/ssh/agent.sh +++ b/regress/usr.bin/ssh/agent.sh @@ -32,17 +32,28 @@ else done ssh-add -l > /dev/null 2>&1 if [ $? -ne 0 ]; then - fail "ssh-add -l did succeed exit code 0" + fail "ssh-add -l failed: exit code $?" + fi + # the same for full pubkey output + ssh-add -L > /dev/null 2>&1 + if [ $? -ne 0 ]; then + fail "ssh-add -L failed: exit code $?" fi trace "simple connect via agent" for p in 1 2; do ssh -o "Protocol=$p" -F $OBJ/ssh_config somehost exit 5$p if [ $? -ne 5$p ]; then - fail "ssh connect with protocol $p failed" + fail "ssh connect with protocol $p failed (exit code $?)" fi done + trace "delete all agent keys" + ssh-add -D > /dev/null 2>&1 + if [ $? -ne 0 ]; then + fail "ssh-add -D failed: exit code $?" + fi + trace "kill agent" ssh-agent -k > /dev/null fi -- cgit v1.2.3