Ignore unknown options for openssh compatibility

This commit is contained in:
Merlijn B. W. Wajer 2017-03-09 11:29:11 +01:00
parent b9b7a53313
commit 0befb7719d

18
sshd.go
View file

@ -393,15 +393,17 @@ func loadAuthorisedKeys(authorisedkeys string) {
for _, option := range options {
ports, err := parseOption(option, "local")
if err != nil {
ports, err := parseOption(option, "remote")
if err != nil {
log.Fatal(err)
} else {
devinfo.RemotePorts = ports
}
} else {
if err == nil {
devinfo.LocalPorts = ports
continue
}
ports, err := parseOption(option, "remote")
if err == nil {
devinfo.RemotePorts = ports
continue
}
if *verbose {
log.Println("Unknown option:", option)
}
}