Fix CMD: Generate host keys in correct custom directory
This commit is contained in:
@@ -34,5 +34,5 @@ WORKDIR /data
|
||||
EXPOSE 2222
|
||||
|
||||
# Start SSH daemon
|
||||
# Generate host keys on startup if missing (for ephemeral pods)
|
||||
CMD ["/bin/bash", "-c", "ssh-keygen -A && /usr/sbin/sshd -D -f /etc/ssh/sshd_config"]
|
||||
# Fix: Explicitly generate keys into the custom host_keys directory
|
||||
CMD ["/bin/bash", "-c", "ssh-keygen -f /etc/ssh/host_keys/ssh_host_rsa_key -N '' -t rsa && ssh-keygen -f /etc/ssh/host_keys/ssh_host_ecdsa_key -N '' -t ecdsa && ssh-keygen -f /etc/ssh/host_keys/ssh_host_ed25519_key -N '' -t ed25519 && /usr/sbin/sshd -D -f /etc/ssh/sshd_config"]
|
||||
Reference in New Issue
Block a user