README.dns 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. How to verify host keys using OpenSSH and DNS
  2. ---------------------------------------------
  3. OpenSSH contains support for verifying host keys using DNS as described
  4. in https://tools.ietf.org/html/rfc4255. The document contains very brief
  5. instructions on how to use this feature. Configuring DNS is out of the
  6. scope of this document.
  7. (1) Server: Generate and publish the DNS RR
  8. To create a DNS resource record (RR) containing a fingerprint of the
  9. public host key, use the following command:
  10. ssh-keygen -r hostname -f keyfile -g
  11. where "hostname" is your fully qualified hostname and "keyfile" is the
  12. file containing the public host key file. If you have multiple keys,
  13. you should generate one RR for each key.
  14. In the example above, ssh-keygen will print the fingerprint in a
  15. generic DNS RR format parsable by most modern name server
  16. implementations. If your nameserver has support for the SSHFP RR
  17. you can omit the -g flag and ssh-keygen will print a standard SSHFP RR.
  18. To publish the fingerprint using the DNS you must add the generated RR
  19. to your DNS zone file and sign your zone.
  20. (2) Client: Enable ssh to verify host keys using DNS
  21. To enable the ssh client to verify host keys using DNS, you have to
  22. add the following option to the ssh configuration file
  23. ($HOME/.ssh/config or /etc/ssh/ssh_config):
  24. VerifyHostKeyDNS yes
  25. Upon connection the client will try to look up the fingerprint RR
  26. using DNS. If the fingerprint received from the DNS server matches
  27. the remote host key, the user will be notified.
  28. Jakob Schlyter
  29. Wesley Griffin
  30. $OpenBSD: README.dns,v 1.2 2003/10/14 19:43:23 jakob Exp $