Created
February 1, 2012 10:50
-
-
Save jpmens/1716455 to your computer and use it in GitHub Desktop.
Create SSHFP records from facter facts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
fqdn=`facter fqdn` | |
for algo in rsa dsa | |
do | |
type=$algo | |
[ $type == 'dsa' ] && type=dss | |
facter "ssh${algo}key" | sed -e "s/^/ssh-${type} /" > /tmp/x | |
ssh-keygen -r $fqdn -f /tmp/x | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment