root / example / instance-image.d / ssh @ 611fa6b0
History | View | Annotate | Download (393 Bytes)
1 |
#!/bin/bash |
---|---|
2 |
|
3 |
# Remove all generated keys so that each instance has unique keys for ssh |
4 |
|
5 |
. common.sh |
6 |
|
7 |
if [ "${IMAGE_DEBUG} " = 1 ] ; then |
8 |
set -x |
9 |
fi |
10 |
|
11 |
HOST_KEY="/etc/ssh/ssh_host_key" |
12 |
RSA_KEY="/etc/ssh/ssh_host_rsa_key" |
13 |
DSA_KEY="/etc/ssh/ssh_host_dsa_key" |
14 |
|
15 |
for key in $HOST_KEY $RSA_KEY $DSA_KEY ; do |
16 |
if [ -f "${TARGET}/${key}" ] ; then |
17 |
rm -f ${TARGET}/${key} |
18 |
fi |
19 |
done |
20 |
|
21 |
exit 0 |