diff --git a/cmd/control/console_init.go b/cmd/control/console_init.go index eacf5cfb..2f73b4a3 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 ", - "PermitRootLogin ", - "ServerKeyBits ", - "AllowGroups ", + "UseDNS no", + "PermitRootLogin no", + "ServerKeyBits 2048", + "AllowGroups docker", } { - match, err := regexp.Match("(?m)^"+item, sshdConfig) + match, err := regexp.Match("^"+item, sshdConfig) if err != nil { return err }