mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
feat: connect through ssh
This commit is contained in:
1 parent
4c292fd6ba
commit
a6720cfe39
5 files changed
+192
-43
No files matched your search
+1
-2
@@ -25,13 +25,12 @@ COPY ./quests/.includes/zshrc /etc/zsh/zshrc
|
||||
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
|
||||
RUN chmod 600 /home/${USERNAME}/.ssh/authorized_keys \
|
||||
&& chmod 700 /home/${USERNAME}/.ssh \
|
||||
&& chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}/.ssh
|
||||
|
||||
RUN apt-get install -y net-tools
|
||||
|
||||
RUN service ssh start
|
||||
|
||||
EXPOSE 22
|
||||
|
||||
Reference in new issue
Block a user