Displaying 3 results from an estimated 3 matches for "check_keys_absent".
2025 Jan 10
2
[PATCH v2] ssh-add: support external parsing of key listing
...trace "sleeping 2*${SSHAGENT_TIMEOUT} seconds"
sleep ${SSHAGENT_TIMEOUT}
sleep ${SSHAGENT_TIMEOUT}
- ${SSHADD} -l 2> /dev/null | grep 'The agent has no identities.' >/dev/null
- if [ $? -ne 0 ]; then
- fail "ssh-add -l still returns keys after timeout"
- fi
+ check_keys_absent "after timeout"
trace "kill agent"
${SSHAGENT} -k > /dev/null
diff --git a/regress/agent.sh b/regress/agent.sh
index f0022aca5..c33e8407e 100644
--- a/regress/agent.sh
+++ b/regress/agent.sh
@@ -22,8 +22,9 @@ if [ $r -ne 0 ]; then
fi
${SSHADD} -l > /dev/null 2>...
2025 Jan 10
1
[PATCH v2] ssh-add: support external parsing of key listing
...else
trace "sleeping 2*${SSHAGENT_TIMEOUT} seconds"
sleep ${SSHAGENT_TIMEOUT}
sleep ${SSHAGENT_TIMEOUT}
- ${SSHADD} -l 2> /dev/null | grep 'The agent has no identities.' >/dev/null
- if [ $? -ne 0 ]; then
- fail "ssh-add -l still returns keys after timeout"
- fi
+ check_keys_absent "after timeout"
trace "kill agent"
${SSHAGENT} -k > /dev/null
diff --git a/regress/agent.sh b/regress/agent.sh
index f0022aca5..c33e8407e 100644
--- a/regress/agent.sh
+++ b/regress/agent.sh
@@ -22,8 +22,9 @@ if [ $r -ne 0 ]; then
fi
${SSHADD} -l > /dev/null 2>&1...
2025 Jan 09
2
[PATCH] ssh-add: support parser-friendly operation
From: Corey Hickey <chickey at tagged.com>
When ssh-add is used in a script like:
if ! KEY_LISTING=$(ssh-add -l 2>&1) ; then
echo "SSH agent error" >&2
exit 2
fi
...the operation fails when there is an agent but there are no keys in
the agent. This is because ssh-add exits with status of 1. If the
intent is to examine the keys in the agent,