15 lines
240 B
Bash
Executable File
15 lines
240 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Regenerate ssh key per container
|
|
|
|
if [ ! -f "/etc/ssh/keys/ssh_host_rsa_key" ]; then
|
|
# Regen keys
|
|
ssh-keygen -A
|
|
|
|
# Move keys to keys dir
|
|
mkdir -p /data/keys/
|
|
mv /etc/ssh/ssh_host_* /data/keys/
|
|
fi
|
|
|
|
rm /start.d/gen-ssh
|