summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-19 04:31:25 -0500
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2009-02-19 04:31:25 -0500
commit16161f54955fda7bf71e3d8bc9ffc192b98f5a4f (patch)
tree52c897f556696cb05b61f18fb02bd8f5493b3e04
parent85c1f65ccd66be7f7ca939729f84bfab0603fdab (diff)
parent9214361c3f2775e0e71ef319335ba331a5a77f37 (diff)
Merge commit 'jrollins/master'
-rwxr-xr-xsrc/monkeysphere-host9
1 files changed, 6 insertions, 3 deletions
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