Ignore unknown options for openssh compatibility
This commit is contained in:
parent
b9b7a53313
commit
0befb7719d
1 changed files with 10 additions and 8 deletions
18
sshd.go
18
sshd.go
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue