diff --git a/ssh/CHANGELOG.md b/ssh/CHANGELOG.md index db7e0c0..4bd84da 100644 --- a/ssh/CHANGELOG.md +++ b/ssh/CHANGELOG.md @@ -1,8 +1,5 @@ # Changelog -## 5.3 -- Fix: User root not allowed because account is locked - ## 5.2 - Update Hass.io CLI to 2.1.0 diff --git a/ssh/Dockerfile b/ssh/Dockerfile index 7da9330..55f6fb6 100644 --- a/ssh/Dockerfile +++ b/ssh/Dockerfile @@ -27,6 +27,5 @@ RUN apk add --no-cache curl \ # Copy data COPY run.sh / COPY motd /etc/ -COPY sshd_config /etc/ssh/ CMD [ "/run.sh" ] diff --git a/ssh/config.json b/ssh/config.json index ac0073f..de25263 100644 --- a/ssh/config.json +++ b/ssh/config.json @@ -1,6 +1,6 @@ { "name": "SSH server", - "version": "5.3", + "version": "5.2", "slug": "ssh", "description": "Allows connections over SSH", "url": "https://home-assistant.io/addons/ssh/", diff --git a/ssh/run.sh b/ssh/run.sh index f1e7643..c0468af 100755 --- a/ssh/run.sh +++ b/ssh/run.sh @@ -7,6 +7,10 @@ KEYS_PATH=/data/host_keys AUTHORIZED_KEYS=$(jq --raw-output ".authorized_keys[]" $CONFIG_PATH) PASSWORD=$(jq --raw-output ".password" $CONFIG_PATH) +# Init defaults config +sed -i s/#PermitRootLogin.*/PermitRootLogin\ yes/ /etc/ssh/sshd_config +sed -i s/#LogLevel.*/LogLevel\ DEBUG/ /etc/ssh/sshd_config + if [ -n "$AUTHORIZED_KEYS" ]; then echo "[INFO] Setup authorized_keys" diff --git a/ssh/sshd_config b/ssh/sshd_config deleted file mode 100644 index d1ebcf0..0000000 --- a/ssh/sshd_config +++ /dev/null @@ -1,20 +0,0 @@ -# This is the sshd server system-wide configuration file. See -# sshd_config(5) for more information. - -# Logging -LogLevel DEBUG - -# Default -AllowTcpForwarding no -GatewayPorts no -X11Forwarding no - -Subsystem sftp /usr/lib/ssh/sftp-server - -# Authentication: -PermitRootLogin yes - -#PasswordAuthentication no -#PermitEmptyPasswords no - -