X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=src%2Fmonkeysphere-host;h=a67715f3ae30fd60f92d9263c591ecc8082159ce;hb=39996655a57ca3167e733d0a0457941ae4060270;hp=00f7c3441a8437bc92704779cafc2d1ede500d69;hpb=6476671df265a673b678ee692d5010202bc519d6;p=monkeysphere.git diff --git a/src/monkeysphere-host b/src/monkeysphere-host index 00f7c34..a67715f 100755 --- a/src/monkeysphere-host +++ b/src/monkeysphere-host @@ -172,6 +172,11 @@ show_key() { # import the host key into the tmp dir gpg --quiet --import <"$HOST_KEY_FILE" + # create the ssh key + TMPSSH="$GNUPGHOME"/ssh_host_key_rsa_pub + openpgp2ssh <"$HOST_KEY_FILE" 2>/dev/null >"$TMPSSH" + + # get the gpg fingerprint HOST_FINGERPRINT=$(gpg --quiet --list-keys --with-colons --with-fingerprint \ | grep '^fpr:' | cut -d: -f10 ) @@ -188,9 +193,7 @@ show_key() { # list the ssh fingerprint echo -n "ssh fingerprint: " - ssh-keygen -l -f /dev/stdin \ - <<<$(openpgp2ssh <"$HOST_KEY_FILE" 2>/dev/null) \ - | awk '{ print $1, $2, $4 }' + ssh-keygen -l -f "$TMPSSH" | awk '{ print $1, $2, $4 }' # remove the tmp file trap - EXIT