~rtroy/vmbuilder/esxiimplementation-enhanced

« back to all changes in this revision

Viewing changes to examples/ec2-firstboot.sh

  • Committer: Soren Hansen
  • Date: 2008-11-27 13:27:54 UTC
  • mfrom: (267.2.16 vmbuilder-fsimage)
  • Revision ID: soren@canonical.com-20081127132754-6sgolhe6f5csvlko
Merge my offline branch with the security fixes from jdstrand.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
#
 
4
# Regenerate the ssh host key
 
5
#
 
6
 
 
7
rm -f /etc/ssh/ssh_host_*_key*
 
8
 
 
9
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -t rsa -N '' | logger -s -t "ec2"
 
10
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -t dsa -N '' | logger -s -t "ec2"
 
11
 
 
12
# This allows user to get host keys securely through console log
 
13
echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----" | logger -s -t "ec2"
 
14
ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub | logger -s -t "ec2"
 
15
ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key.pub | logger -s -t "ec2"
 
16
echo "-----END SSH HOST KEY FINGERPRINTS-----" | logger -s -t "ec2"
 
17
 
 
18
depmod -a
 
19
 
 
20
exit 0