--- a/access/users.go Tue Sep 17 22:09:41 2019 -0500
+++ b/access/users.go Tue Sep 17 22:50:27 2019 -0500
@@ -5,6 +5,7 @@
log "github.com/sirupsen/logrus"
@@ -57,19 +58,26 @@
// iterate through the file reading one ssh public key at a time
pubkey, _, _, buffer, err = ssh.ParseAuthorizedKey(buffer)
- log.Warnf("failed to parse key file for user %s: %v", username, err)
+ if !strings.HasSuffix(err.Error(), "ssh: no key found") { + log.Warnf("failed to parse key file for user %s: %v", username, err) fingerprint := ssh.FingerprintSHA256(pubkey)
keys[fingerprint] = username
+ log.Infof("loaded %d keys for user %q", counter, username) // UsernameFromFingerprint looks up a username from an SSH key's fingerprint