Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F6986861
D3012.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D3012.diff
View Options
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
@@ -8,6 +8,8 @@
{% from "map.jinja" import paths, capabilities with context %}
+{% set network = salt["node.resolve_network"]() %}
+
# -------------------------------------------------------------
# OpenSSH
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -17,6 +19,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"] | default(false) }}
sftp: {{ paths.sftp }}
print_motd: {{ not capabilities['MOTD-printed-at-login'] }}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 19, 16:44 (1 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2585206
Default Alt Text
D3012.diff (1 KB)
Attached To
Mode
D3012: Don't listen to world SSH for IntraNought servers
Attached
Detach File
Event Timeline
Log In to Comment