authorized_keys: allow comments (or otherwise invalid lines)
This commit is contained in:
parent
98a6f4ec64
commit
4d1e594a22
1 changed files with 3 additions and 1 deletions
4
sshd.go
4
sshd.go
|
@ -386,7 +386,9 @@ func loadAuthorisedKeys(authorisedkeys string) {
|
||||||
pubkey, comment, options, rest, err := ssh.ParseAuthorizedKey(authorisedKeysBytes)
|
pubkey, comment, options, rest, err := ssh.ParseAuthorizedKey(authorisedKeysBytes)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Printf("Error parsing line: %s", err)
|
||||||
|
authorisedKeysBytes = rest
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
devinfo := deviceInfo{Comment: comment}
|
devinfo := deviceInfo{Comment: comment}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue