-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable DSA ssh keys by default (#13056)
* Disable DSA ssh keys by default OpenSSH has disabled DSA keys since version 7.0 As the docker runs openssh > v7.0 we should just disable DSA keys by default. Refers to #11417 Signed-off-by: Andrew Thornton <[email protected]> * Just disable DSA keys by default Signed-off-by: Andrew Thornton <[email protected]> * Appears we need to set the minimum key sizes too Signed-off-by: Andrew Thornton <[email protected]> * Appears we need to set the minimum key sizes too Signed-off-by: Andrew Thornton <[email protected]> * Remove DSA type * Fix Tests Co-authored-by: techknowlogick <[email protected]> Co-authored-by: Lauris BH <[email protected]>
- Loading branch information
1 parent
06f1cdd
commit ea69ec6
Showing
8 changed files
with
25 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -122,15 +122,16 @@ var ( | |
CreateAuthorizedKeysFile bool `ini:"SSH_CREATE_AUTHORIZED_KEYS_FILE"` | ||
ExposeAnonymous bool `ini:"SSH_EXPOSE_ANONYMOUS"` | ||
}{ | ||
Disabled: false, | ||
StartBuiltinServer: false, | ||
Domain: "", | ||
Port: 22, | ||
ServerCiphers: []string{"aes128-ctr", "aes192-ctr", "aes256-ctr", "[email protected]", "arcfour256", "arcfour128"}, | ||
ServerKeyExchanges: []string{"diffie-hellman-group1-sha1", "diffie-hellman-group14-sha1", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "[email protected]"}, | ||
ServerMACs: []string{"[email protected]", "hmac-sha2-256", "hmac-sha1", "hmac-sha1-96"}, | ||
KeygenPath: "ssh-keygen", | ||
MinimumKeySizes: map[string]int{"ed25519": 256, "ecdsa": 256, "rsa": 2048, "dsa": 1024}, | ||
Disabled: false, | ||
StartBuiltinServer: false, | ||
Domain: "", | ||
Port: 22, | ||
ServerCiphers: []string{"aes128-ctr", "aes192-ctr", "aes256-ctr", "[email protected]", "arcfour256", "arcfour128"}, | ||
ServerKeyExchanges: []string{"diffie-hellman-group1-sha1", "diffie-hellman-group14-sha1", "ecdh-sha2-nistp256", "ecdh-sha2-nistp384", "ecdh-sha2-nistp521", "[email protected]"}, | ||
ServerMACs: []string{"[email protected]", "hmac-sha2-256", "hmac-sha1", "hmac-sha1-96"}, | ||
KeygenPath: "ssh-keygen", | ||
MinimumKeySizeCheck: true, | ||
MinimumKeySizes: map[string]int{"ed25519": 256, "ecdsa": 256, "rsa": 2048}, | ||
} | ||
|
||
// Security settings | ||
|
@@ -679,7 +680,7 @@ func NewContext() { | |
} | ||
} | ||
|
||
SSH.MinimumKeySizeCheck = sec.Key("MINIMUM_KEY_SIZE_CHECK").MustBool() | ||
SSH.MinimumKeySizeCheck = sec.Key("MINIMUM_KEY_SIZE_CHECK").MustBool(SSH.MinimumKeySizeCheck) | ||
minimumKeySizes := Cfg.Section("ssh.minimum_key_sizes").Keys() | ||
for _, key := range minimumKeySizes { | ||
if key.MustInt() != -1 { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters