tests: fix confidential ssh Dockerfile

Need to set correct permissions for ssh directories and files

Fixes: #11005

Signed-Off-By: Ryan Savino <ryan.savino@amd.com>
This commit is contained in:
Ryan Savino 2025-03-10 18:29:48 -05:00
parent 730e007abd
commit 1dbe3fb8bc

View File

@ -34,4 +34,8 @@ RUN passwd -d root
# Generated with `ssh-keygen -t ed25519 -f unencrypted -P "" -C ""` # Generated with `ssh-keygen -t ed25519 -f unencrypted -P "" -C ""`
COPY ssh/unencrypted.pub /root/.ssh/authorized_keys COPY ssh/unencrypted.pub /root/.ssh/authorized_keys
# Set correct permissions for SSH folders and files
RUN chmod 700 /root/.ssh
RUN chmod 600 /root/.ssh/authorized_keys
ENTRYPOINT ["/usr/sbin/sshd", "-D"] ENTRYPOINT ["/usr/sbin/sshd", "-D"]