diff --git a/cmd/ssh-chat/cmd.go b/cmd/ssh-chat/cmd.go index 218cfcd..ac7639a 100644 --- a/cmd/ssh-chat/cmd.go +++ b/cmd/ssh-chat/cmd.go @@ -126,6 +126,9 @@ func main() { err = fromFile(options.Admin, func(line []byte) error { key, _, _, _, err := ssh.ParseAuthorizedKey(line) if err != nil { + if err.Error() == "ssh: no key found" { + return nil // Skip line + } return err } auth.Op(key, 0) @@ -138,6 +141,9 @@ func main() { err = fromFile(options.Whitelist, func(line []byte) error { key, _, _, _, err := ssh.ParseAuthorizedKey(line) if err != nil { + if err.Error() == "ssh: no key found" { + return nil // Skip line + } return err } auth.Whitelist(key, 0)