X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fshare%2Fm%2Fssh_proxycommand;h=33bd8a12c773c28648f9c3251a91e98b43c1c53d;hb=c600e3474acfee2e4eff1f000a1131c0f5905d08;hp=01ca488bdf6ed805d3350ea3c25470fe5a76cad4;hpb=c8d0dccee22d1fe4e65edebbf624915c3fc8a8af;p=monkeysphere.git diff --git a/src/share/m/ssh_proxycommand b/src/share/m/ssh_proxycommand index 01ca488..33bd8a1 100644 --- a/src/share/m/ssh_proxycommand +++ b/src/share/m/ssh_proxycommand @@ -111,27 +111,24 @@ EOF fi fi - # find all 'pub' and 'sub' lines in the gpg output, which each - # represent a retrieved key for the user ID + # find all keys in the gpg output ('pub' and 'sub' lines) and + # output the ones that match the host key or that have marginal + # validity echo "$gpgOut" | cut -d: -f1,2,5,10,12 | \ while IFS=: read -r type validity keyid uidfpr usage ; do case $type in 'pub'|'sub') # get the ssh key of the gpg key sshKeyGPG=$(gpg2ssh "$keyid") - # if a key was retrieved from the host... if [ "$sshKeyOffered" ] ; then - - # if one of keys found matches the one offered by the - # host, then output info + # if one of the keys matches the one offered by + # the host, then output info and return if [ "$sshKeyGPG" = "$sshKeyOffered" ] ; then log info < 0)) ; then log info <