Ver código fonte

Print the last ssh log time

Bob Mottram 8 anos atrás
pai
commit
5881b038c7
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2
    0
      src/freedombone-utils-ssh

+ 2
- 0
src/freedombone-utils-ssh Ver arquivo

@@ -46,6 +46,8 @@ function configure_ssh {
46 46
         sed 's|#HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config
47 47
         sed 's|HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config
48 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 51
     sed -i 's|#IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
50 52
     sed -i 's|IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
51 53
     sed -i "s/Port .*/Port $SSH_PORT/g" /etc/ssh/sshd_config