fixed the ssh config

This commit is contained in:
2026-02-27 15:36:05 +11:00
parent b283f1e305
commit 96b10177d4

View File

@@ -52,19 +52,7 @@ RUN mkdir -p /var/run/sshd && \
# Custom sshd_config for non-root usage # Custom sshd_config for non-root usage
# StrictModes no: Required for non-root / random UID environments # StrictModes no: Required for non-root / random UID environments
# PidFile: Point to /tmp for guaranteed write access # PidFile: Point to /tmp for guaranteed write access
RUN echo "Port 2222 \ RUN echo "Port 2222\nPermitRootLogin no\nPasswordAuthentication no\nPubkeyAuthentication yes\nStrictModes no\nPidFile /tmp/sshd.pid\nHostKey /data/ssh/ssh_host_rsa_key\nHostKey /data/ssh/ssh_host_ecdsa_key\nHostKey /data/ssh/ssh_host_ed25519_key\nAuthorizedKeysFile .ssh/authorized_keys\nChallengeResponseAuthentication no\nUsePAM yes\nSubsystem sftp /usr/lib/openssh/sftp-server" > /etc/ssh/sshd_config
PermitRootLogin no \
PasswordAuthentication no \
PubkeyAuthentication yes \
StrictModes no \
PidFile /tmp/sshd.pid \
HostKey /data/ssh/ssh_host_rsa_key \
HostKey /data/ssh/ssh_host_ecdsa_key \
HostKey /data/ssh/ssh_host_ed25519_key \
AuthorizedKeysFile .ssh/authorized_keys \
ChallengeResponseAuthentication no \
UsePAM yes \
Subsystem sftp /usr/lib/openssh/sftp-server" > /etc/ssh/sshd_config
# Create a user 'claw' (UID 1000) with sudo access # Create a user 'claw' (UID 1000) with sudo access
RUN useradd -m -s /bin/bash -u 1000 claw && \ RUN useradd -m -s /bin/bash -u 1000 claw && \