fixed the ssh config
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -52,19 +52,7 @@ RUN mkdir -p /var/run/sshd && \
|
||||
# Custom sshd_config for non-root usage
|
||||
# StrictModes no: Required for non-root / random UID environments
|
||||
# PidFile: Point to /tmp for guaranteed write access
|
||||
RUN echo "Port 2222 \
|
||||
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
|
||||
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
|
||||
|
||||
# Create a user 'claw' (UID 1000) with sudo access
|
||||
RUN useradd -m -s /bin/bash -u 1000 claw && \
|
||||
|
||||
Reference in New Issue
Block a user