瀏覽代碼

Print the last ssh log time

Bob Mottram 8 年之前
父節點
當前提交
5881b038c7
共有 1 個檔案被更改,包括 2 行新增0 行删除
  1. 2
    0
      src/freedombone-utils-ssh

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

46
         sed 's|#HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config
46
         sed 's|#HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config
47
         sed 's|HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config
47
         sed 's|HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config
48
     fi
48
     fi
49
+    sed -i 's|#PrintLastLog.*|PrintLastLog yes|g' /etc/ssh/sshd_config
50
+    sed -i 's|PrintLastLog.*|PrintLastLog yes|g' /etc/ssh/sshd_config
49
     sed -i 's|#IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
51
     sed -i 's|#IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
50
     sed -i 's|IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
52
     sed -i 's|IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
51
     sed -i "s/Port .*/Port $SSH_PORT/g" /etc/ssh/sshd_config
53
     sed -i "s/Port .*/Port $SSH_PORT/g" /etc/ssh/sshd_config