3 ms·
Pretty slick stuff. Fair warning: your "sed -i.bak" lines are only going to wind up with the next to last version backed up since each update to sshd_config wil
by skywhopper 13y ago
Pretty slick stuff. Fair warning: your "sed -i.bak" lines are only going to wind up with the next to last version backed up since each update to sshd_config will overwrite the last sshd_config.bak.
You could chain all the sed changes together into one command (tested on Linux, OSX's sed might need some tweaks):
sed -i.bak 's/^#\?\(\(ChallengeResponse\|Password\)Authentication\).*$/\1 no/' /etc/sshd_config
- trestrantham 13y agoThis a great tip! We've updated the post and credited you for the info. Thanks!