diff --git a/iso/installer/install.sh b/iso/installer/install.sh index 1d7d5b02..44c0bc14 100755 --- a/iso/installer/install.sh +++ b/iso/installer/install.sh @@ -159,10 +159,10 @@ ListenStream= ListenStream=64294 " mySSHSETTINGS=" +Port 64295 Match Group tpotlogs PermitOpen 127.0.0.1:64305 ForceCommand /usr/bin/false -Port 64295 " myRANDOM_HOUR=$(shuf -i 2-22 -n 1) myRANDOM_MINUTE=$(shuf -i 0-59 -n 1) diff --git a/update.sh b/update.sh index 9e116f21..abd009f0 100755 --- a/update.sh +++ b/update.sh @@ -218,8 +218,13 @@ echo # Ensure some defaults echo "### Ensure some T-Pot defaults with regard to some folders, permissions and configs." -sed -i '/^port/Id' /etc/ssh/sshd_config -echo "Port 64295" >> /etc/ssh/sshd_config +sed -i '/^port/I,$d' /etc/ssh/sshd_config +tee -a /etc/ssh/sshd_config << EOF +Port 64295 +Match Group tpotlogs + PermitOpen 127.0.0.1:64305 + ForceCommand /usr/bin/false +EOF echo ### Ensure creation of T-Pot related folders, just in case