diff options
| -rwxr-xr-x | public/thesiah.sh | 4 | ||||
| -rwxr-xr-x | static/thesiah.sh | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/public/thesiah.sh b/public/thesiah.sh index 5120465..19a8a0a 100755 --- a/public/thesiah.sh +++ b/public/thesiah.sh @@ -495,11 +495,11 @@ STOP_CHARGE_THRESH_BAT1=75" > /etc/tlp.d/01-battery.conf tlp start >/dev/null 2>&1 } -tlpsetup() { +sshsetup() { whiptail --infobox "Setting up ssh..." 7 50 [ -x "$(command -v "ssh")" ] || installpkg openssh pacman -Qq openssh-"$initsys" >/dev/null 2>&1 || installpkg openssh-"$initsys" - sed -Ei "s/^#?(ListenAddress) 0\.0\.0\.0/\1 127\.0\.0\.1;s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config + sed -Ei "/^#Port\s*22$/s/#//;s/^#?(ListenAddress) 0\.0\.0\.0/\1 127\.0\.0\.1;s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config >/dev/null 2>&1 case "$initsys" in "runit") ln -sf /etc/runit/sv/sshd /run/runit/service/ >/dev/null 2>&1 diff --git a/static/thesiah.sh b/static/thesiah.sh index 5120465..19a8a0a 100755 --- a/static/thesiah.sh +++ b/static/thesiah.sh @@ -495,11 +495,11 @@ STOP_CHARGE_THRESH_BAT1=75" > /etc/tlp.d/01-battery.conf tlp start >/dev/null 2>&1 } -tlpsetup() { +sshsetup() { whiptail --infobox "Setting up ssh..." 7 50 [ -x "$(command -v "ssh")" ] || installpkg openssh pacman -Qq openssh-"$initsys" >/dev/null 2>&1 || installpkg openssh-"$initsys" - sed -Ei "s/^#?(ListenAddress) 0\.0\.0\.0/\1 127\.0\.0\.1;s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config + sed -Ei "/^#Port\s*22$/s/#//;s/^#?(ListenAddress) 0\.0\.0\.0/\1 127\.0\.0\.1;s/^#?(PasswordAuthentication).*/\1 no;s/^#?(UsePAM).*/\1 no" /etc/ssh/sshd_config >/dev/null 2>&1 case "$initsys" in "runit") ln -sf /etc/runit/sv/sshd /run/runit/service/ >/dev/null 2>&1 |
