Skip to content

Commit 054bd11

Browse files
committed
remove sha1 key-exchange mechanisms from default
Move diffie-hellman-group14-sha1 and diffie-hellman-group-exchange-sha1 to 'weak' KEX mechanisms. References: * https://stribika.github.io/2015/01/04/secure-secure-shell.html * #64 Signed-off-by: Dominik Richter <[email protected]>
1 parent 3f78b0b commit 054bd11

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libraries/get_ssh_kex.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ def self.get_kexs(node, weak_kex)
2727
weak_kex = weak_kex ? 'weak' : 'default'
2828

2929
kex_59 = {}
30-
kex_59.default = 'diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1'
31-
kex_59['weak'] = kex_59['default'] + ',diffie-hellman-group1-sha1'
30+
kex_59.default = 'diffie-hellman-group-exchange-sha256'
31+
kex_59['weak'] = kex_59['default'] + ',diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1'
3232

3333
kex_66 = {}
34-
kex_66.default = '[email protected],diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1'
35-
kex_66['weak'] = kex_66['default'] + ',diffie-hellman-group1-sha1'
34+
kex_66.default = '[email protected],diffie-hellman-group-exchange-sha256'
35+
kex_66['weak'] = kex_66['default'] + ',diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1'
3636

3737
# determine the kex for the operating system
3838
kex = kex_59

0 commit comments

Comments
 (0)