Browse Source

Ignore rhosts

Bob Mottram 7 years ago
parent
commit
4eeee4415a
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      src/freedombone-utils-ssh

+ 2
- 0
src/freedombone-utils-ssh View File

40
     if [[ $(is_completed $FUNCNAME) == "1" ]]; then
40
     if [[ $(is_completed $FUNCNAME) == "1" ]]; then
41
         return
41
         return
42
     fi
42
     fi
43
+    sed -i 's|#IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
44
+    sed -i 's|IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
43
     sed -i "s/Port .*/Port $SSH_PORT/g" /etc/ssh/sshd_config
45
     sed -i "s/Port .*/Port $SSH_PORT/g" /etc/ssh/sshd_config
44
     sed -i "s/#Port ${SSH_PORT}/Port ${SSH_PORT}/g" /etc/ssh/sshd_config
46
     sed -i "s/#Port ${SSH_PORT}/Port ${SSH_PORT}/g" /etc/ssh/sshd_config
45
     sed -i 's/PermitRootLogin.*/PermitRootLogin no/g' /etc/ssh/sshd_config
47
     sed -i 's/PermitRootLogin.*/PermitRootLogin no/g' /etc/ssh/sshd_config