Skip to content
Snippets Groups Projects
Commit bb0b72db authored by Maciej Wielgosz's avatar Maciej Wielgosz
Browse files

updated key autherntication for oracle machine

parent 24f45195
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
torchvision \
tqdm \
pandas
# OpenSSH configuration
RUN mkdir /var/run/sshd \
&& sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
......@@ -52,8 +53,16 @@ RUN groupadd -g ${GID} ${USERNAME} \
&& mkdir -p ${HOME}/data ${HOME}/.vscode-server ${HOME}/.ssh\
&& chown ${USERNAME}:${USERNAME} ${HOME}/data ${HOME}/.vscode-server ${HOME}/.ssh
# Copy your public key to the container
COPY id_rsa.pub /home/${USERNAME}/.ssh/authorized_keys
RUN chown ${USERNAME}:${USERNAME} /home/${USERNAME}/.ssh/authorized_keys \
&& chmod 600 /home/${USERNAME}/.ssh/authorized_keys
VOLUME [ "${HOME}/data", "${HOME}/.ssh", "${HOME}/.vscode-server"]
# Expose SSH
EXPOSE 22
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment