docker-nexus/gen-ssh

14 lines
215 B
Bash
Executable File

#!/bin/sh
# Regenerate ssh key per container
if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then
# Regen keys
ssh-keygen -A
# Move keys to keys dir
mv /etc/ssh/ssh_host_* /etc/ssh/keys/
fi
rm /start.d/gen-ssh