feat: generate key pair using ssh2 for right public key format

This commit is contained in:
Justin Lin committed 2024-10-14 11:34:53 +08:00
1 parent 03b2993b56
commit 261c6fc029
6 files changed
+20 -15

No files matched your search

+1 -1
View File
@@ -26,7 +26,7 @@ ENV USERNAME=commander
RUN adduser --disabled-password --gecos '' --shell /bin/zsh ${USERNAME}
COPY ./quests/sshd_config /etc/ssh/sshd_config
COPY ./ssh_pubkey /home/${USERNAME}/.ssh/authorized_keys
COPY ./config/ssh_key.pub /home/${USERNAME}/.ssh/authorized_keys
RUN chmod 600 /home/${USERNAME}/.ssh/authorized_keys \
&& chmod 700 /home/${USERNAME}/.ssh \
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.ssh