From 6a87cc655672cc609a717036d46a0caabe0fe7bd Mon Sep 17 00:00:00 2001 From: Vincent Fiduccia Date: Fri, 1 Sep 2017 01:06:13 -0700 Subject: [PATCH] Only add ssh options that aren't set --- cmd/control/console_init.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 }