-
Notifications
You must be signed in to change notification settings - Fork 725
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide granular noop for shh configuration #789
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ ListenAddress {{ address }} | |
{% endfor %} | ||
|
||
# HostKeys are listed here. | ||
{% for key in ssh_host_key_files %} | ||
{% for key in ssh_host_key_files if ssh_host_key_config%} | ||
HostKey {{ key }} | ||
{% endfor %} | ||
|
||
|
@@ -73,14 +73,14 @@ LogLevel {{ sshd_log_level }} | |
# -- see: (http://net-ssh.github.com/net-ssh/classes/Net/SSH/Transport/CipherFactory.html) | ||
# | ||
{# This outputs 'Ciphers <list-of-ciphers>' if ssh_ciphers is defined or '#Ciphers' if ssh_ciphers is undefined -#} | ||
{{ 'Ciphers ' ~ ssh_ciphers|join(',') if ssh_ciphers else 'Ciphers'|comment }} | ||
{{ 'Ciphers ' ~ ssh_ciphers|join(',') if ssh_ciphers and ssh_ciphers_config else 'Ciphers'|comment }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This and the changes for MACs and Kex shouldn't be needed since
Or is there something I am missing where we want to define Ciphers but not actually configure them? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually on main we have :
So what about if I doesn't want to define Ciphers and does not want to configure them ? |
||
|
||
# **Hash algorithms** -- SHA-1 is formally deprecated by NIST in 2011 because of security issues. | ||
# Weak HMAC is sometimes required if older package versions are used | ||
# eg Ruby's Net::SSH at around 2.2.* doesn't support sha2 for hmac, so this will have to be set true in this case. | ||
# | ||
{# This outputs 'MACs <list-of-macs>' if ssh_macs is defined or '#MACs' if ssh_macs is undefined -#} | ||
{{ 'MACs ' ~ ssh_macs|join(',') if ssh_macs else 'MACs'|comment }} | ||
{{ 'MACs ' ~ ssh_macs|join(',') if ssh_macs and ssh_macs_config else 'MACs'|comment }} | ||
|
||
{% if sshd_version is version('5.9', '<') %} | ||
# Alternative setting, if OpenSSH version is below v5.9 | ||
|
@@ -93,7 +93,7 @@ LogLevel {{ sshd_log_level }} | |
# based on: https://bettercrypto.org/static/applied-crypto-hardening.pdf | ||
# | ||
{# This outputs 'KexAlgorithms <list-of-algos>' if ssh_kex is defined or '#KexAlgorithms' if ssh_kex is undefined #} | ||
{{ 'KexAlgorithms ' ~ ssh_kex|join(',') if ssh_kex else 'KexAlgorithms'|comment }} | ||
{{ 'KexAlgorithms ' ~ ssh_kex|join(',') if ssh_kex and ssh_kex_config else 'KexAlgorithms'|comment }} | ||
|
||
# Authentication | ||
# -------------- | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do something like
{{ 'Ciphers ' ~ ssh_ciphers|join(',') if ssh_ciphers and ssh_ciphers_config else 'Ciphers'|comment }}
here, too?