c3d2-wiki/SSHFP.mw

59 lines
1.0 KiB
Plaintext
Raw Normal View History

== Publish SSH Host Key Fingerprints in DNS ==
2014-02-26 06:24:12 +01:00
üblicherweise werden durch ssh-keygen folgende .pub Schlüsselpaare erstellt:
2014-02-26 06:15:53 +01:00
<source lang="bash">
/etc/ssh/ssh_host_rsa_key.pub
/etc/ssh/ssh_host_dsa_key.pub
/etc/ssh/ssh_host_ecdsa_key.pub
2014-02-26 06:15:53 +01:00
</source>
2014-02-26 06:24:12 +01:00
ein typischer SSHFP Record sieht wie folgt aus:
2014-02-26 06:15:53 +01:00
<source lang="bash">
server.hq.c3d2.de. 86400 IN SSHFP 2 1 2492656260c5452d5c5452c6d21ea770f79bb9c8
2014-02-26 06:15:53 +01:00
</source>
2014-02-26 06:24:12 +01:00
2 gibt den Typ des SSH Keys an, die Angabe wird unterteilt in:
2014-02-26 06:15:53 +01:00
{{NiftyDiv|
Farbe=#b4d9fa|
Inhalt=
2014-02-26 06:19:25 +01:00
Value: '''0''' Algorithm name: '''reserved'''
2014-02-26 06:20:19 +01:00
2014-02-26 06:19:25 +01:00
Value: '''1''' Algorithm name: '''RSA'''
2014-02-26 06:20:42 +01:00
2014-02-26 06:19:25 +01:00
Value: '''2''' Algorithm name: '''DSA'''
2014-02-26 06:20:42 +01:00
2014-02-26 06:19:25 +01:00
Value: '''3''' Algorithm name: '''ECDSA'''
2014-02-26 06:15:53 +01:00
}}
siehe RFC6594
2014-02-26 06:24:12 +01:00
1 gibt den Hash Algorithmus an:
2014-02-26 06:15:53 +01:00
{{NiftyDiv|
Farbe=#b4d9fa|
Inhalt=
2014-02-26 06:19:25 +01:00
Value: '''1''' Algorithm name: '''SHA1'''
2014-02-26 06:20:42 +01:00
2014-02-26 06:19:25 +01:00
Value: '''2''' Algorithm name: '''SHA256'''
2014-02-26 06:15:53 +01:00
}}
siehe RFC6594
2014-02-26 06:24:12 +01:00
Die Berechnung des Fingerprintes erfolgt mit:
2014-02-26 06:15:53 +01:00
<source lang="bash">
awk '{print $2}' /etc/ssh/ssh_host_dsa_key.pub | openssl base64 -d -A | openssl sha1
2014-02-26 06:15:53 +01:00
</source>