summaryrefslogtreecommitdiff
path: root/src/monkeysphere-ssh-proxycommand
diff options
context:
space:
mode:
authorJameson Graef Rollins <jrollins@finestructure.net>2008-11-16 17:26:14 -0500
committerJameson Graef Rollins <jrollins@finestructure.net>2008-11-16 17:26:14 -0500
commitd91a9e05ef6c351f40d931d2f7d19e3a3979279c (patch)
tree7d2612f99ea1a85052ac6faad52ba3f8814ee118 /src/monkeysphere-ssh-proxycommand
parent5d9949335aeb1dec04f530cbb3dfcac24288706a (diff)
add some more informative debug output to key processing.
Diffstat (limited to 'src/monkeysphere-ssh-proxycommand')
-rwxr-xr-xsrc/monkeysphere-ssh-proxycommand14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/monkeysphere-ssh-proxycommand b/src/monkeysphere-ssh-proxycommand
index b039844..aeea30d 100755
--- a/src/monkeysphere-ssh-proxycommand
+++ b/src/monkeysphere-ssh-proxycommand
@@ -45,20 +45,24 @@ output_no_valid_key() {
local sshKeyGPG
local sshFingerprint
- log "OpenPGP keys with*out* full validity found for this host:"
+ userID="ssh://${HOSTP}"
+
+ log "Monkeysphere found only OpenPGP keys for this host with*out* full validity."
+ log "host: $userID"
log
# retrieve the actual ssh key
sshKeyOffered=$(ssh-keyscan -t rsa -p "$PORT" "$HOST" 2>/dev/null | awk '{ print $2, $3 }')
+ # FIXME: should we do any checks for failed keyscans, eg host not
+ # found?
- userID="ssh://${HOSTP}"
-
- # output gpg info for (exact) userid and store
+ # output gpg info for userid and store
gpgOut=$(gpg --list-key --fixed-list-mode --with-colon \
--with-fingerprint --with-fingerprint \
="$userID" 2>/dev/null)
- # loop over all lines in the gpg output and process.
+ # find all 'pub' and 'sub' lines in the gpg output, which each
+ # represent a retrieved key for the user ID
echo "$gpgOut" | cut -d: -f1,2,5,10,12 | \
while IFS=: read -r type validity keyid uidfpr usage ; do
case $type in