Browse Source

Merge Ubuntu and Fedora instructions for ssh/sshd setup

Implements: blueprint merge-dib-hadoop-elements
Change-Id: Iabcb30abee4ccf79235aeb113eaa414a44835693
tags/0.2.1.rc1
Matthew Farrellee 5 years ago
parent
commit
b7def9d8c3
1 changed files with 45 additions and 14 deletions
  1. 45
    14
      elements/hadoop_fedora/post-install.d/13-connection-setup

+ 45
- 14
elements/hadoop_fedora/post-install.d/13-connection-setup View File

@@ -8,21 +8,52 @@ echo "Adjusting ssh configuration"
8 8
 # Note1: augtool on Ubuntu does not auto-save, pass -s
9 9
 install-packages augeas openssh-server openssh-clients
10 10
 
11
-augtool set /files/etc/ssh/sshd_config/PasswordAuthentication yes
12
-augtool set /files/etc/ssh/sshd_config/UseDNS no
13
-augtool set /files/etc/ssh/sshd_config/PermitTunnel yes
14
-augtool set /files/etc/ssh/sshd_config/SyslogFacility AUTH
15
-augtool set /files/etc/ssh/sshd_config/PermitRootLogin yes
16
-augtool set /files/etc/ssh/sshd_config/StrictModes yes
17
-augtool set /files/etc/ssh/sshd_config/RSAAuthentication yes
18
-augtool set /files/etc/ssh/sshd_config/PubkeyAuthentication yes
19
-augtool set /files/etc/ssh/sshd_config/IgnoreRhosts yes
20
-
21
-augtool set /files/etc/ssh/ssh_config/Host/StrictHostKeyChecking no
22
-augtool set /files/etc/ssh/ssh_config/Host/GSSAPIDelegateCredentials no
23
-augtool set /files/etc/ssh/ssh_config/Host/GSSAPIAuthentication no
24 11
 
12
+##
13
+## ssh server configuration
14
+##
15
+
16
+# Unique to Ubuntu
17
+augtool -s set /files/etc/ssh/sshd_config/PasswordAuthentication yes
18
+augtool -s set /files/etc/ssh/sshd_config/GSSAPICleanupCredentials yes
19
+augtool -s set /files/etc/ssh/sshd_config/AuthorizedKeysFile .ssh/authorized_keys
20
+
21
+# Unique to Fedora
22
+augtool -s set /files/etc/ssh/sshd_config/SyslogFacility AUTH
23
+augtool -s set /files/etc/ssh/sshd_config/PermitRootLogin yes
24
+augtool -s set /files/etc/ssh/sshd_config/StrictModes yes
25
+augtool -s set /files/etc/ssh/sshd_config/RSAAuthentication yes
26
+augtool -s set /files/etc/ssh/sshd_config/PubkeyAuthentication yes
27
+augtool -s set /files/etc/ssh/sshd_config/IgnoreRhosts yes
28
+
29
+# Common
30
+augtool -s set /files/etc/ssh/sshd_config/GSSAPIAuthentication no
31
+augtool -s set /files/etc/ssh/sshd_config/UseDNS no
32
+augtool -s set /files/etc/ssh/sshd_config/PermitTunnel yes
33
+
34
+
35
+##
36
+## ssh client configuration
37
+##
38
+
39
+# Unique to Ubuntu
40
+#none
41
+
42
+# Unique to Fedora
43
+augtool -s set /files/etc/ssh/ssh_config/Host/GSSAPIDelegateCredentials no
44
+
45
+# Common
46
+augtool -s set /files/etc/ssh/ssh_config/Host/StrictHostKeyChecking no
47
+augtool -s set /files/etc/ssh/ssh_config/Host/GSSAPIAuthentication no
48
+
49
+
50
+##
51
+## Misc configuration
52
+##
53
+
54
+# Unique to Fedora
25 55
 # No known augeas lense for cloud-init config
26 56
 sed -i 's/ssh_pwauth:   0/ssh_pwauth:   1/' /etc/cloud/cloud.cfg
27 57
 
28
-augtool clear /files/etc/sudoers/Defaults[type=':nrpe']/requiretty/negate
58
+# Unique to Fedora
59
+augtool -s clear /files/etc/sudoers/Defaults[type=':nrpe']/requiretty/negate

Loading…
Cancel
Save