cloud-init/tools/write-ssh-key-fingerprints
Scott Moser 134fa8d255 move writing of ssh key fingerprints to a separate tool
This will allow this code to be called more easily elsewhere.
I'm considering having the "all the way up" message contain fingerprints
so that they're more or less guaranteed to get to the console where
the user could see them.
2011-01-19 03:49:51 +00:00

11 lines
381 B
Bash
Executable File

#!/bin/sh
{
echo
echo "#############################################################"
echo "-----BEGIN SSH HOST KEY FINGERPRINTS-----"
ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub
ssh-keygen -l -f /etc/ssh/ssh_host_dsa_key.pub
echo "-----END SSH HOST KEY FINGERPRINTS-----"
echo "#############################################################"
} | logger -p user.info -s -t "ec2"