Statistics
| Branch: | Revision:

root / example / instance-image.d / ssh @ c6253116

History | View | Annotate | Download (401 Bytes)

1
#!/bin/bash
2

    
3
# Remove all generated keys so that each instance has unique keys for ssh
4

    
5
set -e
6

    
7
. common.sh
8

    
9
if [ "${IMAGE_DEBUG} " = 1 ] ; then
10
    set -x
11
fi
12

    
13
HOST_KEY="/etc/ssh/ssh_host_key"
14
RSA_KEY="/etc/ssh/ssh_host_rsa_key"
15
DSA_KEY="/etc/ssh/ssh_host_dsa_key"
16

    
17
for key in $HOST_KEY $RSA_KEY $DSA_KEY ; do
18
    if [ -f "${TARGET}/${key}" ] ; then
19
        rm -f ${TARGET}/${key}
20
    fi
21
done
22

    
23
exit 0