diff --git a/setup/adguard-install.sh b/setup/adguard-install.sh index ec248d10..bfaf8b83 100644 --- a/setup/adguard-install.sh +++ b/setup/adguard-install.sh @@ -107,10 +107,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/blocky-install.sh b/setup/blocky-install.sh index 39690a37..620c57a2 100644 --- a/setup/blocky-install.sh +++ b/setup/blocky-install.sh @@ -363,10 +363,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/casaos-install.sh b/setup/casaos-install.sh index dbd62604..23ea0f98 100644 --- a/setup/casaos-install.sh +++ b/setup/casaos-install.sh @@ -116,10 +116,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/changedetection-install.sh b/setup/changedetection-install.sh index 486c474b..923ca216 100644 --- a/setup/changedetection-install.sh +++ b/setup/changedetection-install.sh @@ -122,10 +122,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/daemonsync-install.sh b/setup/daemonsync-install.sh index ef0b5f9b..e70c9943 100644 --- a/setup/daemonsync-install.sh +++ b/setup/daemonsync-install.sh @@ -109,10 +109,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/dashy-install.sh b/setup/dashy-install.sh index 7bd1c5a0..677b4913 100644 --- a/setup/dashy-install.sh +++ b/setup/dashy-install.sh @@ -140,10 +140,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/debian-install.sh b/setup/debian-install.sh index 96b5f984..124a8984 100644 --- a/setup/debian-install.sh +++ b/setup/debian-install.sh @@ -101,10 +101,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/deconz-install.sh b/setup/deconz-install.sh index 476a61a9..7c5f1b08 100644 --- a/setup/deconz-install.sh +++ b/setup/deconz-install.sh @@ -133,10 +133,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/docker-install.sh b/setup/docker-install.sh index 6fc265d4..b455fbbc 100644 --- a/setup/docker-install.sh +++ b/setup/docker-install.sh @@ -159,10 +159,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/emby-install.sh b/setup/emby-install.sh index 1c0b0622..979f1955 100644 --- a/setup/emby-install.sh +++ b/setup/emby-install.sh @@ -122,10 +122,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/emqx-install.sh b/setup/emqx-install.sh index da49201b..e73f7777 100644 --- a/setup/emqx-install.sh +++ b/setup/emqx-install.sh @@ -107,10 +107,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/esphome-install.sh b/setup/esphome-install.sh index 15160dce..91092358 100644 --- a/setup/esphome-install.sh +++ b/setup/esphome-install.sh @@ -129,10 +129,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/grafana-install.sh b/setup/grafana-install.sh index 0570d690..c912e472 100644 --- a/setup/grafana-install.sh +++ b/setup/grafana-install.sh @@ -116,10 +116,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi systemctl start grafana-server systemctl enable grafana-server.service &>/dev/null diff --git a/setup/grocy-install.sh b/setup/grocy-install.sh index 20166eb0..8740d66f 100644 --- a/setup/grocy-install.sh +++ b/setup/grocy-install.sh @@ -145,10 +145,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/heimdalldashboard-install.sh b/setup/heimdalldashboard-install.sh index 4f57ac50..ff8cc386 100644 --- a/setup/heimdalldashboard-install.sh +++ b/setup/heimdalldashboard-install.sh @@ -140,10 +140,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/homeassistant-core-install.sh b/setup/homeassistant-core-install.sh index cde1bef3..d49b08f2 100644 --- a/setup/homeassistant-core-install.sh +++ b/setup/homeassistant-core-install.sh @@ -185,10 +185,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/homeassistant-install.sh b/setup/homeassistant-install.sh index 6e78f010..11af7412 100644 --- a/setup/homeassistant-install.sh +++ b/setup/homeassistant-install.sh @@ -343,10 +343,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/homebridge-install.sh b/setup/homebridge-install.sh index f6ab776c..8ce65cf0 100644 --- a/setup/homebridge-install.sh +++ b/setup/homebridge-install.sh @@ -119,10 +119,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/homepage-install.sh b/setup/homepage-install.sh index 80c4ef20..0f60d5b1 100644 --- a/setup/homepage-install.sh +++ b/setup/homepage-install.sh @@ -137,10 +137,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/influxdb-install.sh b/setup/influxdb-install.sh index 7e8aab4c..07c40091 100644 --- a/setup/influxdb-install.sh +++ b/setup/influxdb-install.sh @@ -140,10 +140,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/iobroker-install.sh b/setup/iobroker-install.sh index 271401b6..5c2580db 100644 --- a/setup/iobroker-install.sh +++ b/setup/iobroker-install.sh @@ -107,10 +107,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/jellyfin-install.sh b/setup/jellyfin-install.sh index b9e9de7a..176dc5fc 100644 --- a/setup/jellyfin-install.sh +++ b/setup/jellyfin-install.sh @@ -147,10 +147,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/keycloak-install.sh b/setup/keycloak-install.sh index b72f14fe..6e412b6d 100644 --- a/setup/keycloak-install.sh +++ b/setup/keycloak-install.sh @@ -128,10 +128,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/magicmirror-install.sh b/setup/magicmirror-install.sh index a1ab2eec..e252fea4 100644 --- a/setup/magicmirror-install.sh +++ b/setup/magicmirror-install.sh @@ -224,10 +224,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/mariadb-install.sh b/setup/mariadb-install.sh index b4e261ce..6d0ad608 100644 --- a/setup/mariadb-install.sh +++ b/setup/mariadb-install.sh @@ -124,10 +124,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/meshcentral-install.sh b/setup/meshcentral-install.sh index 1e5789be..114424d5 100644 --- a/setup/meshcentral-install.sh +++ b/setup/meshcentral-install.sh @@ -118,10 +118,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/motioneye-install.sh b/setup/motioneye-install.sh index f718adc4..b7528335 100644 --- a/setup/motioneye-install.sh +++ b/setup/motioneye-install.sh @@ -137,10 +137,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/mqtt-install.sh b/setup/mqtt-install.sh index 180b0c45..b0d2406d 100644 --- a/setup/mqtt-install.sh +++ b/setup/mqtt-install.sh @@ -114,10 +114,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/n8n-install.sh b/setup/n8n-install.sh index 70e4b615..a6689a66 100644 --- a/setup/n8n-install.sh +++ b/setup/n8n-install.sh @@ -130,10 +130,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/navidrome-install.sh b/setup/navidrome-install.sh index b6cc28e5..e08f0842 100644 --- a/setup/navidrome-install.sh +++ b/setup/navidrome-install.sh @@ -156,10 +156,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/nextcloudpi-install.sh b/setup/nextcloudpi-install.sh index 217eb7cf..dba702f4 100644 --- a/setup/nextcloudpi-install.sh +++ b/setup/nextcloudpi-install.sh @@ -105,10 +105,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/nginx-proxy-manager-install.sh b/setup/nginx-proxy-manager-install.sh index 9fc27d3d..f60e548d 100644 --- a/setup/nginx-proxy-manager-install.sh +++ b/setup/nginx-proxy-manager-install.sh @@ -262,10 +262,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Starting Services" diff --git a/setup/nocodb-install.sh b/setup/nocodb-install.sh index be07ed72..9244e605 100644 --- a/setup/nocodb-install.sh +++ b/setup/nocodb-install.sh @@ -136,10 +136,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/node-red-install.sh b/setup/node-red-install.sh index 8e7257ec..b535cf54 100644 --- a/setup/node-red-install.sh +++ b/setup/node-red-install.sh @@ -138,10 +138,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/omada-install.sh b/setup/omada-install.sh index dc5a8ded..d55510f9 100644 --- a/setup/omada-install.sh +++ b/setup/omada-install.sh @@ -112,10 +112,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/omv-install.sh b/setup/omv-install.sh index f5bf3267..3b8b07e3 100644 --- a/setup/omv-install.sh +++ b/setup/omv-install.sh @@ -124,10 +124,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/openhab-install.sh b/setup/openhab-install.sh index 082db069..24600d2d 100644 --- a/setup/openhab-install.sh +++ b/setup/openhab-install.sh @@ -124,10 +124,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/photoprism-install.sh b/setup/photoprism-install.sh index 85349d25..a879cc0e 100644 --- a/setup/photoprism-install.sh +++ b/setup/photoprism-install.sh @@ -197,10 +197,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/pihole-install.sh b/setup/pihole-install.sh index a43a230e..1b785b05 100644 --- a/setup/pihole-install.sh +++ b/setup/pihole-install.sh @@ -127,10 +127,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/plex-install.sh b/setup/plex-install.sh index fad4c048..47883856 100644 --- a/setup/plex-install.sh +++ b/setup/plex-install.sh @@ -126,10 +126,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/podman-homeassistant-install.sh b/setup/podman-homeassistant-install.sh index c7e09cd7..9cd77087 100644 --- a/setup/podman-homeassistant-install.sh +++ b/setup/podman-homeassistant-install.sh @@ -160,10 +160,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/postgresql-install.sh b/setup/postgresql-install.sh index 8587b17c..4b5986be 100644 --- a/setup/postgresql-install.sh +++ b/setup/postgresql-install.sh @@ -231,10 +231,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/prometheus-install.sh b/setup/prometheus-install.sh index 8b3f7907..8c0b5dc8 100644 --- a/setup/prometheus-install.sh +++ b/setup/prometheus-install.sh @@ -136,10 +136,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/scrypted-install.sh b/setup/scrypted-install.sh index b9b9223f..1bb80bdc 100644 --- a/setup/scrypted-install.sh +++ b/setup/scrypted-install.sh @@ -195,10 +195,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/shinobi-install.sh b/setup/shinobi-install.sh index 6eeb65cc..a72a5572 100644 --- a/setup/shinobi-install.sh +++ b/setup/shinobi-install.sh @@ -165,10 +165,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/syncthing-install.sh b/setup/syncthing-install.sh index cb3b2113..15e34ca2 100644 --- a/setup/syncthing-install.sh +++ b/setup/syncthing-install.sh @@ -110,10 +110,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/technitiumdns-install.sh b/setup/technitiumdns-install.sh index ab51a406..509e2fda 100644 --- a/setup/technitiumdns-install.sh +++ b/setup/technitiumdns-install.sh @@ -107,10 +107,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/trilium-install.sh b/setup/trilium-install.sh index f62528e7..f5080744 100644 --- a/setup/trilium-install.sh +++ b/setup/trilium-install.sh @@ -131,10 +131,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/ubuntu-install.sh b/setup/ubuntu-install.sh index 9b7597ba..3cc2a4b3 100644 --- a/setup/ubuntu-install.sh +++ b/setup/ubuntu-install.sh @@ -102,10 +102,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/umbrel-install.sh b/setup/umbrel-install.sh index e233a6a7..11f26a6d 100644 --- a/setup/umbrel-install.sh +++ b/setup/umbrel-install.sh @@ -117,10 +117,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" apt-get autoremove >/dev/null diff --git a/setup/unifi-install.sh b/setup/unifi-install.sh index 0a7f87e3..2210a47e 100644 --- a/setup/unifi-install.sh +++ b/setup/unifi-install.sh @@ -115,10 +115,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/uptimekuma-install.sh b/setup/uptimekuma-install.sh index a7305c9e..f08f5021 100644 --- a/setup/uptimekuma-install.sh +++ b/setup/uptimekuma-install.sh @@ -136,10 +136,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/vaultwarden-install.sh b/setup/vaultwarden-install.sh index bcd58970..2047f631 100644 --- a/setup/vaultwarden-install.sh +++ b/setup/vaultwarden-install.sh @@ -192,10 +192,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/whoogle-install.sh b/setup/whoogle-install.sh index 964b437c..b574667a 100644 --- a/setup/whoogle-install.sh +++ b/setup/whoogle-install.sh @@ -124,10 +124,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/wikijs-install.sh b/setup/wikijs-install.sh index 01d3df47..51255211 100644 --- a/setup/wikijs-install.sh +++ b/setup/wikijs-install.sh @@ -152,10 +152,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/wireguard-install.sh b/setup/wireguard-install.sh index 6d726417..e8b82753 100644 --- a/setup/wireguard-install.sh +++ b/setup/wireguard-install.sh @@ -166,10 +166,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/zigbee2mqtt-install.sh b/setup/zigbee2mqtt-install.sh index 910dffb4..2ac580b7 100644 --- a/setup/zigbee2mqtt-install.sh +++ b/setup/zigbee2mqtt-install.sh @@ -152,10 +152,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up" diff --git a/setup/zwave-js-ui-install.sh b/setup/zwave-js-ui-install.sh index 68ab1885..031ef329 100644 --- a/setup/zwave-js-ui-install.sh +++ b/setup/zwave-js-ui-install.sh @@ -128,10 +128,8 @@ EOF msg_ok "Customized Container" fi if [[ "${SSH_ROOT}" == "yes" ]]; then - cat <>/etc/ssh/sshd_config -PermitRootLogin yes -EOF -systemctl restart sshd + sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config + systemctl restart sshd fi msg_info "Cleaning up"