diff options
author | Micah Anderson <micah@riseup.net> | 2014-11-21 18:19:07 -0500 |
---|---|---|
committer | Micah Anderson <micah@riseup.net> | 2014-11-21 21:20:29 -0500 |
commit | d78749fd8f9ae2482b8e31c74698362c5c1f2341 (patch) | |
tree | be006349425e323811b541893ac1cbc04bf312e5 /templates/sshd_config/FreeBSD.erb | |
parent | 03751baf8e426ea45c47167357ec0f9278134a8e (diff) |
Add a $hostkey_type variable that allows you to set which hostkey
types you want to support in your sshd_config.
We use the ssh_version fact to determine the default hostkey types.
Only enable rsa and ed25519 for ssh versions greater or equal
to 6.5, otherwise enable rsa and dsa.
Some distributions, such as debian, also enable ecdsa as a hostkey
type, but this is a known bad NIST curve, so we do not enable that
by default (thus deviating from the stock sshd config)
Diffstat (limited to 'templates/sshd_config/FreeBSD.erb')
-rw-r--r-- | templates/sshd_config/FreeBSD.erb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/templates/sshd_config/FreeBSD.erb b/templates/sshd_config/FreeBSD.erb index 090149b..d4cd9b5 100644 --- a/templates/sshd_config/FreeBSD.erb +++ b/templates/sshd_config/FreeBSD.erb @@ -40,8 +40,9 @@ Protocol 2 # HostKey for protocol version 1 #HostKey /etc/ssh/ssh_host_key # HostKeys for protocol version 2 -HostKey /etc/ssh/ssh_host_rsa_key -HostKey /etc/ssh/ssh_host_dsa_key +<% scope.lookupvar('sshd::hostkey_type').to_a.each do |hostkey_type| -%> +HostKey /etc/ssh/ssh_host_<%=hostkey_type %>_key +<% end -%> # Lifetime and size of ephemeral version 1 server key #KeyRegenerationInterval 1h |