All checks were successful
Build a dev image / build (push) Successful in 13s
18 lines
506 B
Bash
18 lines
506 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
|
|
|
|
# Cloud image generates this file which prevents sshd from accepting passwords
|
|
rm -f /etc/ssh/sshd_config.d/50-cloud-init.conf
|
|
|
|
exec /usr/sbin/sshd -E /var/log/sshd.log -D
|