mgm-image/service.ssh.sh
Adam Štrauch 4cfda0ca4b
All checks were successful
Build a dev image / build (push) Successful in 6s
Update SSH daemon execution to log output to a specified log file
2025-10-05 21:40:02 +02:00

15 lines
378 B
Bash

#!/bin/sh
if [ ! -e /etc/ssh/sshd_config ]; then
mkdir -p /etc/ssh/sshd_config.d
echo "Include /etc/ssh/sshd_config.d/*.conf
PermitRootLogin yes
AuthorizedKeysFile .ssh/authorized_keys
PasswordAuthentication yes
AllowTcpForwarding yes
GatewayPorts no
X11Forwarding no
Subsystem sftp internal-sftp" > /etc/ssh/sshd_config
fi
exec /usr/sbin/sshd -E /var/log/sshd.log -D