1
0
mirror of https://github.com/rancher/os.git synced 2025-08-30 21:26:09 +00:00

Revert "Only add SSH configuration lines that are not set"

This commit is contained in:
Sven Dowideit 2017-09-13 22:07:52 +10:00 committed by GitHub
parent 4b6ffe752e
commit a608098c39

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
}