Displaying 3 results from an estimated 3 matches for "_check_keys_present".
Did you mean:
check_keys_present
2025 Jan 10
2
[PATCH v2] ssh-add: support external parsing of key listing
...dd again"
check_key_absent() {
${SSHADD} -L | grep "^$1 " >/dev/null
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 62c00fd8c..89170657e 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -495,6 +495,28 @@ stop_sshd ()
PIDFILE=""
}
+_check_keys_present() {
+ AGENT_LISTING=$(${SSHADD} -l 2> /dev/null)
+ r=$?
+ if [ $r -ne 0 ]; then
+ fail "$1: ssh-add -l returned unexpected exit code: $r"
+ fi
+ NUM_LINES=$(printf "%s" "$AGENT_LISTING" | wc -l)
+ [ "$NUM_LINES" -ne 0 ]
+}
+
+check_keys_absent() {
+ if _c...
2025 Jan 10
1
[PATCH v2] ssh-add: support external parsing of key listing
...fter readd again"
check_key_absent() {
${SSHADD} -L | grep "^$1 " >/dev/null
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 62c00fd8c..89170657e 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -495,6 +495,28 @@ stop_sshd ()
PIDFILE=""
}
+_check_keys_present() {
+ AGENT_LISTING=$(${SSHADD} -l 2> /dev/null)
+ r=$?
+ if [ $r -ne 0 ]; then
+ fail "$1: ssh-add -l returned unexpected exit code: $r"
+ fi
+ NUM_LINES=$(printf "%s" "$AGENT_LISTING" | wc -l)
+ [ "$NUM_LINES" -ne 0 ]
+}
+
+check_keys_absent() {
+ if _ch...
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,