Skip to content
Snippets Groups Projects
Commit 263b914b authored by Keegan Mullaney's avatar Keegan Mullaney
Browse files

update with new sshd_config defaults

some defaults changed so sed should be updated to search for them
parent 89b84fe2
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -43,9 +43,9 @@ qc_set_authorized_key() {
# disable root user access and limit login attempts
echo
lkm_pause "Press [Enter] to configure sshd security settings..."
sudo sed -i -e "s/#PermitRootLogin yes|PermitRootLogin no/" \
sudo sed -i -e "s/#PermitRootLogin prohibit-password|PermitRootLogin prohibit-password/" \
-e "s/PasswordAuthentication yes/PasswordAuthentication no/" \
-e "s/#MaxStartups 10:30:60/MaxStartups 2:30:10/" \
-e "s/#MaxStartups 10:30:100/MaxStartups 2:30:10/" \
-e "/Banner \/etc\/issue.net/ s/^# //" /etc/ssh/sshd_config
if grep -q "AllowUsers $(whoami)" /etc/ssh/sshd_config; then
echo "AllowUsers is already configured"
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment