Skip to content

Commit

Permalink
Merge pull request #362 from ReneTrippen/master
Browse files Browse the repository at this point in the history
write ciphers,macs and kex as comma-separated string
  • Loading branch information
saz committed Sep 26, 2023
2 parents 575a7fe + d2f0658 commit 82682df
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/sshd_config.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 -%>
Expand Down

0 comments on commit 82682df

Please sign in to comment.