mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-07 08:31:55 +00:00
16 lines
414 B
Bash
Executable File
16 lines
414 B
Bash
Executable File
#! /bin/bash
|
|
|
|
# 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
|