Print the last ssh log time

This commit is contained in:
Bob Mottram 2017-06-26 15:19:46 +01:00
parent 2a66fae204
commit 5881b038c7
1 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,8 @@ function configure_ssh {
sed 's|#HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config
sed 's|HostbasedAuthentication.*|HostbasedAuthentication no|g' /etc/ssh/sshd_config
fi
sed -i 's|#PrintLastLog.*|PrintLastLog yes|g' /etc/ssh/sshd_config
sed -i 's|PrintLastLog.*|PrintLastLog yes|g' /etc/ssh/sshd_config
sed -i 's|#IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
sed -i 's|IgnoreRhosts.*|IgnoreRhosts yes|g' /etc/ssh/sshd_config
sed -i "s/Port .*/Port $SSH_PORT/g" /etc/ssh/sshd_config