2015-02-27 16:33:20 -08:00
|
|
|
#! /bin/bash
|
|
|
|
|
2016-01-30 16:49:13 -08:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Regenerate ssh key per container
|
|
|
|
|
2016-01-30 17:19:20 -08:00
|
|
|
if [ ! -f "/etc/ssh/keys/ssh_host_rsa_key" ]; then
|
2016-01-30 16:49:13 -08:00
|
|
|
# Regen keys
|
|
|
|
ssh-keygen -A
|
|
|
|
|
|
|
|
# Move keys to keys dir
|
|
|
|
mv /etc/ssh/ssh_host_* /etc/ssh/keys/
|
2015-02-27 16:33:20 -08:00
|
|
|
fi
|
|
|
|
|
|
|
|
rm /start.d/regenerate-ssh
|