Implement KexAlgorithms settings, based on Key exchange section of

https://stribika.github.io/2015/01/04/secure-secure-shell.html

Note, that on some systems it is uncertain if they will have a new
enough version of openssh installed, so on those a version test is done
to see before setting them.
This commit is contained in:
Micah Anderson 2015-05-01 13:48:19 -04:00
parent fd82841c1f
commit 430c48200e
10 changed files with 26 additions and 0 deletions

View file

@ -151,6 +151,9 @@ AllowGroups <%= s %>
<%- end -%>
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
<% if (scope.function_versioncmp([scope.lookupvar('::ssh_version'),'6.5'])) >= 0 -%>
KexAlgorithms curve25519-sha256@libssh.org
<% end -%>
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -165,6 +165,9 @@ AllowGroups <%= s %>
# CheckHostIP no
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
<% if (scope.function_versioncmp([scope.lookupvar('::ssh_version'),'6.5'])) >= 0 -%>
KexAlgorithms curve25519-sha256@libssh.org
<% end -%>
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -112,6 +112,7 @@ AllowGroups <%= s %>
<%- end -%>
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
KexAlgorithms curve25519-sha256@libssh.org
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -112,6 +112,7 @@ AllowGroups <%= s %>
<%- end -%>
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
KexAlgorithms curve25519-sha256@libssh.org
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -115,6 +115,9 @@ AllowGroups <%= s %>
<%- end -%>
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
<% if (scope.function_versioncmp([scope.lookupvar('::ssh_version'),'6.5'])) >= 0 -%>
KexAlgorithms curve25519-sha256@libssh.org
<% end -%>
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -153,6 +153,9 @@ AllowGroups <%= s %>
<%- end -%>
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
<% if (scope.function_versioncmp([scope.lookupvar('::ssh_version'),'6.5'])) >= 0 -%>
KexAlgorithms curve25519-sha256@libssh.org
<% end -%>
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -148,6 +148,9 @@ AllowGroups <%= s %>
<%- end -%>
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
<% if (scope.function_versioncmp([scope.lookupvar('::ssh_version'),'6.5'])) >= 0 -%>
KexAlgorithms curve25519-sha256@libssh.org
<% end -%>
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -129,6 +129,9 @@ AllowGroups <%= s %>
# ForceCommand cvs server
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
<% if (scope.function_versioncmp([scope.lookupvar('::ssh_version'),'6.5'])) >= 0 -%>
KexAlgorithms curve25519-sha256@libssh.org
<% end -%>
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -116,6 +116,9 @@ AllowGroups <%= s %>
<%- end -%>
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
<% if (scope.function_versioncmp([scope.lookupvar('::ssh_version'),'6.5'])) >= 0 -%>
KexAlgorithms curve25519-sha256@libssh.org
<% end -%>
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>

View file

@ -119,6 +119,9 @@ AllowGroups <%= s %>
PrintMotd <%= scope.lookupvar('sshd::print_motd') %>
<% if scope.lookupvar('sshd::hardened') == 'yes' -%>
<% if (scope.function_versioncmp([scope.lookupvar('::ssh_version'),'6.5'])) >= 0 -%>
KexAlgorithms curve25519-sha256@libssh.org
<% end -%>
Ciphers aes256-ctr
MACs hmac-sha1
<% end -%>