Skip to content

Commit

Permalink
AC: Don't clobber old backups of sshd_config.
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewchilds committed Jul 25, 2012
1 parent 1f3edad commit 560f7b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ addgroup filetransfer
# Config SSH
read -p "What SSH port would you like to use? " my_ssh_port

cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
cp /etc/ssh/sshd_config /etc/ssh/sshd_config.`date +%s`.backup
sed -i'-orig' 's/Port [0-9]\+/Port $my_ssh_port/' /etc/ssh/sshd_config
sed -i'-orig' 's/LoginGraceTime [0-9]\+/LoginGraceTime 30/' /etc/ssh/sshd_config
cat > /etc/ssh/sshd_config << EOF
Expand Down

0 comments on commit 560f7b3

Please sign in to comment.