diff --git a/templates/ssh_instance.erb b/templates/ssh_instance.erb index 66ae52ac..126aed4c 100644 --- a/templates/ssh_instance.erb +++ b/templates/ssh_instance.erb @@ -40,22 +40,30 @@ ListenAddress <%= listen %> <%- v.keys.sort.each do |key| -%> <%- value = v[key] -%> <%- if value.is_a?(Array) -%> + <%- if ['ciphers', 'macs', 'kexalgorithms'].include?(key.downcase) -%> + <%= key %> <%= value.join(',') %> + <%- else -%> <%- value.each do |a| -%> <%- if a != '' && a != nil -%> <%= key %> <%= bool2str(a) %> <%- end -%> <%- end -%> + <%- end -%> <%- elsif value != '' && value != nil -%> <%= key %> <%= bool2str(value) %> <%- end -%> <%- end -%> <%- else -%> <%- if v.is_a?(Array) -%> +<%- if ['ciphers', 'macs', 'kexalgorithms'].include?(k.downcase) -%> +<%= k %> <%= v.join(',') %> +<%- else -%> <%- v.each do |a| -%> <%- if a != '' && a != nil -%> <%= k %> <%= bool2str(a) %> <%- end -%> <%- end -%> +<%- end -%> <%- elsif v != nil and v != '' -%> <%= k %> <%= bool2str(v) %> <%- end -%>