Skip to content

Commit ee301db

Browse files
committed
Configure SSHD
1 parent 667653b commit ee301db

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

scripts/configure-system.sh

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,10 +1349,26 @@ if does_bin_exist 'neofetch'; then
13491349
[ -f "${NEOFETCH_CUSTOM_ASCII_FILE}" ] && set_config_value "${NEOFETCH_CONFIG_FILE}" image_source "\"${NEOFETCH_CUSTOM_ASCII_FILE}\""
13501350
fi
13511351

1352+
###############
1353+
### Network ###
1354+
##############
1355+
if does_bin_exist 'sshd'; then
1356+
SSHD_CONFIG_FILE="${ROOT_ETC}/ssh/sshd_config"
1357+
1358+
set_config_values --separator ' ' "${SSHD_CONFIG_FILE}" \
1359+
'LoginGraceTime' 30 \
1360+
'MaxAuthTries' 2 \
1361+
'MaxSessions' 5
1362+
1363+
if [ "$USER" != "root" ]; then
1364+
set_config_value --separator ' ' "${SSHD_CONFIG_FILE}" 'AllowUsers' "${USER}"
1365+
fi
1366+
fi
1367+
13521368
###################
13531369
### NIGHT LIGHT ###
13541370
###################
1355-
if does_bin_exist "gnome-shell"; then
1371+
if does_bin_exist 'gnome-shell'; then
13561372
set_gsetting org.gnome.settings-daemon.plugins.color night-light-enabled true
13571373
fi
13581374

0 commit comments

Comments
 (0)