Skip to content

Commit 1b33955

Browse files
authored
Merge pull request rancher#2094 from rancher/revert-2070-master
Revert "Only add SSH configuration lines that are not set"
2 parents 4b6ffe7 + a608098 commit 1b33955

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cmd/control/console_init.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,12 +216,12 @@ func modifySshdConfig() error {
216216
sshdConfigString := string(sshdConfig)
217217

218218
for _, item := range []string{
219-
"UseDNS ",
220-
"PermitRootLogin ",
221-
"ServerKeyBits ",
222-
"AllowGroups ",
219+
"UseDNS no",
220+
"PermitRootLogin no",
221+
"ServerKeyBits 2048",
222+
"AllowGroups docker",
223223
} {
224-
match, err := regexp.Match("(?m)^"+item, sshdConfig)
224+
match, err := regexp.Match("^"+item, sshdConfig)
225225
if err != nil {
226226
return err
227227
}

0 commit comments

Comments
 (0)