fix: ssh server

This commit is contained in:
Justin Lin committed 2024-10-10 22:43:39 +08:00
1 parent 19897e607f
commit 5ba0021c37
1 file changed
+3 -2
+3 -2
View File
@@ -26,8 +26,9 @@ ENV USERNAME=commander
RUN adduser --disabled-password --gecos '' --shell /bin/zsh ${USERNAME} RUN adduser --disabled-password --gecos '' --shell /bin/zsh ${USERNAME}
COPY ./ssh_pubkey /home/${USERNAME}/.ssh/authorized_keys COPY ./ssh_pubkey /home/${USERNAME}/.ssh/authorized_keys
RUN chmod 600 /home/${USERNAME}/.ssh/authorized_keys RUN chmod 600 /home/${USERNAME}/.ssh/authorized_keys \
RUN chmod 700 /home/${USERNAME}/.ssh && chmod 700 /home/${USERNAME}/.ssh \
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.ssh
RUN service ssh start RUN service ssh start