File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,17 +106,32 @@ chmod 700 /root/.ssh
106106
107107# Set root password (can be overridden in config)
108108# POC ONLY
109+ echo "init: setting root password" > /dev/kmsg
109110echo "root:root" | chpasswd
110111
111112# Generate host keys if they don't exist
113+ echo "init: generating SSH host keys" > /dev/kmsg
112114if [ ! -f /etc/ssh/ssh_host_rsa_key ]; then
113115 ssh-keygen -A
114116fi
115117
118+ # Configure SSH to allow root password login (POC only - not for production!)
119+ echo "init: configuring SSH for root password login" > /dev/kmsg
120+ cat >> /etc/ssh/sshd_config <<'SSHEOF'
121+
122+ # POC Configuration - Allow root login with password
123+ PermitRootLogin yes
124+ PasswordAuthentication yes
125+ SSHEOF
126+
116127# Start SSH daemon
128+ echo "init: starting sshd daemon" > /dev/kmsg
117129/usr/sbin/sshd
118-
119- echo "init: SSH server started" > /dev/kmsg
130+ if [ $? -eq 0 ]; then
131+ echo "init: SSH server started successfully on port 22" > /dev/kmsg
132+ else
133+ echo "init: ERROR - SSH server failed to start!" > /dev/kmsg
134+ fi
120135echo "init: launching entrypoint from ${WORKDIR:-/}" > /dev/kmsg
121136echo "init: entrypoint=${ENTRYPOINT} cmd=${CMD}" > /dev/kmsg
122137
You can’t perform that action at this time.
0 commit comments