1
0
mirror of https://github.com/rancher/os.git synced 2025-07-15 15:51:36 +00:00

Merge pull request #2094 from rancher/revert-2070-master

Revert "Only add SSH configuration lines that are not set"
This commit is contained in:
Sven Dowideit 2017-09-13 22:08:34 +10:00 committed by GitHub
commit 1b3395523c

View File

@ -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
}