Fix host key copying

This commit is contained in:
Jan Christian Grünhage 2017-04-25 20:41:28 +02:00
parent 31f1c2182f
commit ce8032f96c
Signed by: jcgruenhage
GPG key ID: 321A67D9EE8BC3E1

View file

@ -18,13 +18,15 @@ function writeAuthKeys {
function writeHostKeys { function writeHostKeys {
#Write existing host keys to /etc/ssh #Write existing host keys to /etc/ssh
for f in /backup/keys/ssh_host_*; do cd /backup/keys/
for f in ssh_host_*; do
cp -f $f /etc/ssh/ cp -f $f /etc/ssh/
done done
#Generate missing host keys #Generate missing host keys
ssh-keygen -A ssh-keygen -A
#Copy host keys to volume #Copy host keys to volume
for f in /etc/keys/ssh_host_*; do cd /etc/ssh/
for f in ssh_host_*; do
cp -f $f /backup/keys/ cp -f $f /backup/keys/
done done
} }