diff --git a/cmd/control/console_init.go b/cmd/control/console_init.go index 2f73b4a3..eacf5cfb 100644 --- a/cmd/control/console_init.go +++ b/cmd/control/console_init.go @@ -216,12 +216,12 @@ func modifySshdConfig() error { sshdConfigString := string(sshdConfig) for _, item := range []string{ - "UseDNS no", - "PermitRootLogin no", - "ServerKeyBits 2048", - "AllowGroups docker", + "UseDNS ", + "PermitRootLogin ", + "ServerKeyBits ", + "AllowGroups ", } { - match, err := regexp.Match("^"+item, sshdConfig) + match, err := regexp.Match("(?m)^"+item, sshdConfig) if err != nil { return err }