mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
fix: ssh server
This commit is contained in:
1 parent
19897e607f
commit
5ba0021c37
1 file changed
+3
-2
+3
-2
@@ -26,8 +26,9 @@ ENV USERNAME=commander
|
||||
|
||||
RUN adduser --disabled-password --gecos '' --shell /bin/zsh ${USERNAME}
|
||||
COPY ./ssh_pubkey /home/${USERNAME}/.ssh/authorized_keys
|
||||
RUN chmod 600 /home/${USERNAME}/.ssh/authorized_keys
|
||||
RUN chmod 700 /home/${USERNAME}/.ssh
|
||||
RUN chmod 600 /home/${USERNAME}/.ssh/authorized_keys \
|
||||
&& chmod 700 /home/${USERNAME}/.ssh \
|
||||
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.ssh
|
||||
|
||||
RUN service ssh start
|
||||
|
||||
|
||||
Reference in new issue
Block a user