[prev in list] [next in list] [prev in thread] [next in thread]
List: djbdns
Subject: tinydns and SSHFP records
From: Henning Brauer <lists-djbdns () bsws ! de>
Date: 2006-08-21 13:11:41
Message-ID: 20060821131141.21709.qmail () nudo ! bsws ! de
[Download RAW message or body]
unfortunately it is harder to generate RFC4255-style SSHFP records in
tinydns than it should be, and google doesn't really give too much - so
let me share my q&d script I used to generate said SSHFP records before
I integrated that deeper into our backend systems. maybe it heps
someone, someday...
#!/usr/bin/perl
use strict;
open IN, "ssh-keygen -f /etc/ssh/ssh_host_rsa_key.pub -r $ARGV[0] |";
my $FP = <IN>;
close IN;
chop $FP;
my ($host, $in, $sshfp, $alg, $fptype, $fp) = split " ", $FP;
my $out = sprintf("\\%03o\\%03o", $alg, $fptype);
for (my $i = 0; $i < length($fp); $i += 2) {
$out .= sprintf("\\%03o", hex substr($fp, $i, 2));
}
printf(":%s:44:%s:\n", $host, $out);
--
Henning Brauer, hb@bsws.de, henning@openbsd.org
BS Web Services, http://bsws.de
OpenBSD-based Webhosting, Mail Services, Managed Servers, ...
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic