From e720828d8bd6302c2529ff8059dd6f1b22e91d5e Mon Sep 17 00:00:00 2001 From: "riaan.doorduin" Date: Sat, 19 Sep 2026 12:11:02 +0000 Subject: [PATCH] Add SSH debian --- apps.yaml | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/apps.yaml b/apps.yaml index 3717c30..52439d0 100644 --- a/apps.yaml +++ b/apps.yaml @@ -51,4 +51,48 @@ name: lan external: true +- name: RD-debian-shell-withSSH + descr: Minimal Debian 13 (trixie-slim) shell for one-off tasks + page: https://hub.docker.com/_/debian + category: development + default-credentialss: none + auto-update: false + services: + debian-shell: + image: docker.io/library/debian:trixie-slim + hostname: debian-shell + environment: + DEBIAN_FRONTEND: noninteractive + configs: + - source: 'ssh_authorized_keys' + target: '/etc/ssh_authorized_keys' + mode: 0644 + - source: 'start_sshd' + target: '/start-sshd.sh' + mode: 0755 + command: /start-sshd.sh # <-- this is it: run the script below as the container's PID 1 + ports: + - 22:22:ssh + restart: unless-stopped + configs: # top-level configs: block — this is where the SCRIPT CONTENT actually lives + 'ssh_authorized_keys': + content: | + ssh-ed25519 AAAAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name@yourhost + 'start_sshd': + content: | + #!/bin/sh + set -e + if ! command -v sshd >/dev/null 2>&1; then + apt-get update + apt-get install -y --no-install-recommends openssh-server + rm -rf /var/lib/apt/lists/* + fi + mkdir -p /run/sshd /root/.ssh + cp /etc/ssh_authorized_keys /root/.ssh/authorized_keys + chmod 700 /root/.ssh + chmod 600 /root/.ssh/authorized_keys + sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin prohibit-password/' /etc/ssh/sshd_config + sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config + exec /usr/sbin/sshd -D -e + #The END