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:
commit
1b3395523c
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user