summaryrefslogtreecommitdiff
path: root/tools/write-ssh-key-fingerprints
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-01-19 03:49:51 +0000
committerScott Moser <smoser@ubuntu.com>2011-01-19 03:49:51 +0000
commit8fbafbddbfbdddcb0a3e087185e432973ac73baa (patch)
treeea53a54e70a0e1a147d16df1c399feb4077e695c /tools/write-ssh-key-fingerprints
parentad5dba4b93f7e45c741f73f88cde1fd0bb59f896 (diff)
downloadvyos-cloud-init-8fbafbddbfbdddcb0a3e087185e432973ac73baa.tar.gz
vyos-cloud-init-8fbafbddbfbdddcb0a3e087185e432973ac73baa.zip
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.
Diffstat (limited to 'tools/write-ssh-key-fingerprints')
-rwxr-xr-xtools/write-ssh-key-fingerprints10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/write-ssh-key-fingerprints b/tools/write-ssh-key-fingerprints
new file mode 100755
index 00000000..9a081faa
--- /dev/null
+++ b/tools/write-ssh-key-fingerprints
@@ -0,0 +1,10 @@
+#!/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"