Bob Mottram пре 7 година
родитељ
комит
bbae177910
1 измењених фајлова са 17 додато и 1 уклоњено
  1. 17
    1
      src/freedombone-utils-ssh

+ 17
- 1
src/freedombone-utils-ssh Прегледај датотеку

@@ -13,7 +13,7 @@
13 13
 # License
14 14
 # =======
15 15
 #
16
-# Copyright (C) 2014-2016 Bob Mottram <bob@freedombone.net>
16
+# Copyright (C) 2014-2017 Bob Mottram <bob@freedombone.net>
17 17
 #
18 18
 # This program is free software: you can redistribute it and/or modify
19 19
 # it under the terms of the GNU Affero General Public License as published by
@@ -40,6 +40,22 @@ function configure_ssh {
40 40
     if [[ $(is_completed $FUNCNAME) == "1" ]]; then
41 41
         return
42 42
     fi
43
+
44
+    if ! grep -q 'RhostsRSAAuthentication' /etc/ssh/sshd_config; then
45
+        echo 'RhostsRSAAuthentication yes' >> /etc/ssh/sshd_config
46
+    else
47
+        sed -i 's|#RhostsRSAAuthentication.*|RhostsRSAAuthentication yes|g' /etc/ssh/sshd_config
48
+    fi
49
+    sed -i 's|#StrictModes.*|StrictModes yes|g' /etc/ssh/sshd_config
50
+    sed -i 's|StrictModes.*|StrictModes yes|g' /etc/ssh/sshd_config
51
+    sed -i 's|#KerberosAuthentication.*|KerberosAuthentication no|g' /etc/ssh/sshd_config
52
+    sed -i 's|KerberosAuthentication.*|KerberosAuthentication no|g' /etc/ssh/sshd_config
53
+    sed -i 's|#GSSAPIAuthentication.*|GSSAPIAuthentication no|g' /etc/ssh/sshd_config
54
+    sed -i 's|GSSAPIAuthentication.*|GSSAPIAuthentication no|g' /etc/ssh/sshd_config
55
+    sed -i 's|#IgnoreUserKnownHosts.*|IgnoreUserKnownHosts yes|g' /etc/ssh/sshd_config
56
+    sed -i 's|IgnoreUserKnownHosts.*|IgnoreUserKnownHosts yes|g' /etc/ssh/sshd_config
57
+    sed -i 's|#Compression.*|Compression delayed|g' /etc/ssh/sshd_config
58
+    sed -i 's|Compression.*|Compression delayed|g' /etc/ssh/sshd_config
43 59
     if ! grep -q 'HostbasedAuthentication' /etc/ssh/sshd_config; then
44 60
         echo 'HostbasedAuthentication no' >> /etc/ssh/sshd_config
45 61
     fi