File: Dockerfile-swan-ssh

package info (click to toggle)
libreswan 5.2-2.3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 81,644 kB
  • sloc: ansic: 129,988; sh: 32,018; xml: 20,646; python: 10,303; makefile: 3,022; javascript: 1,506; sed: 574; yacc: 511; perl: 264; awk: 52
file content (22 lines) | stat: -rw-r--r-- 957 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# FROM  DOCKER_PACKAGES
# MAINTAINER "Antony Antony" <antony@phenome.org>
# ENV container docker
# setup ssh
RUN mkdir /root/.ssh
RUN mkdir -p /var/run/sshd
# create ssh host keys
RUN ssh-keygen -P '' -b 2048 -t rsa -f /etc/ssh/ssh_host_key
# move public key to enable ssh keys login
# copy the file /root/.ssh/authorized_keys to cwd
ADD testing/baseconfigs/all/root/.ssh/authorized_keys /root/.ssh/authorized_keys
RUN chmod 400 /root/.ssh/authorized_keys
RUN chown -R root:root /root/.ssh
# RUN systemctl disable sshd
RUN sed -i 's/UsePAM\syes/UsePAM no/' /etc/ssh/sshd_config
RUN sed -i '/UseDNS/d' /etc/ssh/sshd_config
RUN echo "UseDNS no" >> /etc/ssh/sshd_config
RUN sed -i '/StrictModes/d' /etc/ssh/sshd_config
RUN echo "StrictModes no" >> /etc/ssh/sshd_config
ADD testing/docker/bash_profile /root/.bash_profile_docker
RUN cat /root/.bash_profile_docker >> /root/.bashrc; rm /root/.bash_profile_docker
RUN ln -s /home/build/libreswan/testing /testing