update base image to minimize image size

This commit is contained in:
newnius
2017-07-18 21:27:08 +08:00
parent 1a8c9bb3ff
commit 9b87b97752
3 changed files with 27 additions and 4 deletions

View File

@@ -1,4 +1,15 @@
#! /bin/bash
/etc/init.d/ssh start
# from https://github.com/danielguerra69/alpine-sshd
if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then
# generate fresh rsa key
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
fi
if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then
# generate fresh dsa key
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
fi
/etc/init.d/sshd start
ssh -t -t -D 0.0.0.0:7001 -o StrictHostKeyChecking=no localhost