Merge pull request #111 from AJNOURI/master

General purpose Alpine-based endhost.
This commit is contained in:
Julien Duponchelle 2016-04-19 11:28:08 +02:00
commit e644609253
2 changed files with 27 additions and 0 deletions

17
docker/endhost/Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM alpine
RUN apk update
RUN apk add openssh
RUN apk add mtr
RUN apk add nmap
RUN apk add iperf
RUN apk add socat
RUN apk add vim
RUN apk add nano
RUN apk add curl
RUN apk add links
RUN apk add iputils
RUN apk add bind-tools
RUN apk add rsync
RUN apk add bash
VOLUME /root/.ssh /etc/ssh /data
ADD start-ssh.sh start-ssh.sh

View File

@ -0,0 +1,10 @@
#!/bin/sh
ssh-keygen -t rsa -b 4096 -f /etc/ssh/ssh_host_rsa_key -N ''
ssh-keygen -t dsa -b 1024 -f /etc/ssh/ssh_host_dsa_key -N ''
ssh-keygen -t ecdsa -b 256 -f /etc/ssh/ssh_host_ecdsa_key -N ''
ssh-keygen -t ed25519 -b 256 -f /etc/ssh/ssh_host_ed25519_key -N ''
ssh-keygen -f /root/.ssh/id_rsa -N ''
echo 'root:gns3' | chpasswd
sed -i "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config
/usr/sbin/sshd && echo "SSHD started: $(pgrep sshd)"