docker-basessh/regenerate-ssh

16 lines
241 B
Plaintext
Raw Permalink Normal View History

#! /bin/bash
#!/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
# Regen keys
ssh-keygen -A
# Move keys to keys dir
mv /etc/ssh/ssh_host_* /etc/ssh/keys/
fi
rm /start.d/regenerate-ssh