properly handle host keys with no expiration date, store host key fingerprint for...
[monkeysphere.git] / src / seckey2sshagent
index 15e2706ff444aa04aa5c4cf6a68aa11f10d12ab4..1266db5b329987af795f1b6ea286a33f27eb5691 100755 (executable)
@@ -16,9 +16,9 @@
 
 
 cleanup() {
-    echo -n "removing temp gpg home... "
+    echo -n "removing temp gpg home... " 1>&2
     rm -rf $FOO
-    echo "done."
+    echo "done." 1>&2
 }
 
 trap cleanup EXIT
@@ -46,4 +46,7 @@ gpg --export-secret-key $GPGID | GNUPGHOME="$FOO" gpg --import
 
 GNUPGHOME="$FOO" gpg --edit-key $GPGID
 
-GNUPGHOME="$FOO" gpg --export-secret-key $GPGID | openpgp2ssh $GPGID | ssh-add -c /dev/stdin
+ln -s /dev/stdin "$FOO"/openpgp
+
+GNUPGHOME="$FOO" gpg --export-secret-key $GPGID | \
+    openpgp2ssh $GPGID | ssh-add -c "$FOO"/openpgp