1
0
mirror of https://github.com/rancher/os.git synced 2025-07-17 16:41:04 +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) sshdConfigString := string(sshdConfig)
for _, item := range []string{ for _, item := range []string{
"UseDNS ", "UseDNS no",
"PermitRootLogin ", "PermitRootLogin no",
"ServerKeyBits ", "ServerKeyBits 2048",
"AllowGroups ", "AllowGroups docker",
} { } {
match, err := regexp.Match("(?m)^"+item, sshdConfig) match, err := regexp.Match("^"+item, sshdConfig)
if err != nil { if err != nil {
return err return err
} }