From 4d1e594a22fbf954e196de8f8fdab1bcf3fb6ada Mon Sep 17 00:00:00 2001 From: "Merlijn B. W. Wajer" Date: Fri, 10 Mar 2017 11:40:46 +0100 Subject: [PATCH] authorized_keys: allow comments (or otherwise invalid lines) --- sshd.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sshd.go b/sshd.go index 2e97186..6d16a6c 100644 --- a/sshd.go +++ b/sshd.go @@ -386,7 +386,9 @@ func loadAuthorisedKeys(authorisedkeys string) { pubkey, comment, options, rest, err := ssh.ParseAuthorizedKey(authorisedKeysBytes) if err != nil { - log.Fatal(err) + log.Printf("Error parsing line: %s", err) + authorisedKeysBytes = rest + continue } devinfo := deviceInfo{Comment: comment}