Page MenuHomeDevCentral

D3012.id7689.diff
No OneTemporary

D3012.id7689.diff

diff --git a/roles/core/sshd/files/sshd_config b/roles/core/sshd/files/sshd_config
--- a/roles/core/sshd/files/sshd_config
+++ b/roles/core/sshd/files/sshd_config
@@ -14,6 +14,11 @@
# and will be lost if the state is redeployed.
# </auto-generated>
+{% if should_listen_to_private_address -%}
+ListenAddress {{ listen_private_address }}
+ListenAddress localhost
+{%- endif %}
+
# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
# but this is overridden so installations will only check .ssh/authorized_keys
AuthorizedKeysFile .ssh/authorized_keys
diff --git a/roles/core/sshd/init.sls b/roles/core/sshd/init.sls
--- a/roles/core/sshd/init.sls
+++ b/roles/core/sshd/init.sls
@@ -17,6 +17,8 @@
- source: salt://roles/core/sshd/files/sshd_config
- template: jinja
- context:
+ listen_private_address: {{ network["private_ipv4_address"] | default("localhost") }}
+ should_listen_to_private_address: {{ network["is_private_network_stable"] | false }}
sftp: {{ paths.sftp }}
print_motd: {{ not capabilities['MOTD-printed-at-login'] }}

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 3, 02:51 (4 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2864842
Default Alt Text
D3012.id7689.diff (1 KB)

Event Timeline