瀏覽代碼

Ignore rhosts

Bob Mottram 8 年之前
父節點
當前提交
4eeee4415a
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      src/freedombone-utils-ssh

+ 2
- 0
src/freedombone-utils-ssh 查看文件

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