X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fm%2Fssh_proxycommand;h=7ab4bec1331e265eb5b7185cc7eac0b6b753b871;hb=aff684f1821f4145c5aea4ced28c8f3b44051791;hp=d2b45278e1bd3c2e207b0895932f72e5659d0e9a;hpb=0d07156e8db60611c28e5f440ff5f6a39d655ff6;p=monkeysphere.git diff --git a/src/share/m/ssh_proxycommand b/src/share/m/ssh_proxycommand index d2b4527..7ab4bec 100644 --- a/src/share/m/ssh_proxycommand +++ b/src/share/m/ssh_proxycommand @@ -18,8 +18,9 @@ # "marginal case" ouput in the case that there is not a full # validation path to the host output_no_valid_key() { - local sshKeyOffered local userID + local sshKeyOffered + local gpgOut local type local validity local keyid @@ -29,9 +30,12 @@ output_no_valid_key() { local tmpkey local sshFingerprint local gpgSigOut + local returnCode=0 userID="ssh://${HOSTP}" + LOG_PREFIX= + cat <"$sshKeyGPGFile" - sshFingerprint=$(ssh-keygen -l -f "$sshKeyGPGFile" \ + sshFingerprint=$(ssh-keygen -l -f "$sshKeyGPGFile" | \ awk '{ print $2 }') rm -f "$sshKeyGPGFile" @@ -112,11 +116,11 @@ EOF fi ;; esac - done + done || returnCode="$?" # if no key match was made (and the "while read" subshell returned # 1) output how many keys were found - if (($? != 1)) ; then + if (( returnCode != 1 )) ; then cat <