{"id":20534447,"url":"https://github.com/qbit/hostkeydns","last_synced_at":"2026-02-05T04:33:28.831Z","repository":{"id":64304278,"uuid":"457979508","full_name":"qbit/hostkeydns","owner":"qbit","description":"Library for verifying remote ssh keys using DNS and SSHFP resource records.","archived":false,"fork":false,"pushed_at":"2022-02-11T15:55:44.000Z","size":8,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-09T12:08:57.969Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/qbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-10T23:20:52.000Z","updated_at":"2022-02-11T22:59:34.000Z","dependencies_parsed_at":"2023-01-15T10:15:26.114Z","dependency_job_id":null,"html_url":"https://github.com/qbit/hostkeydns","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/qbit/hostkeydns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fhostkeydns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fhostkeydns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fhostkeydns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fhostkeydns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qbit","download_url":"https://codeload.github.com/qbit/hostkeydns/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qbit%2Fhostkeydns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29111896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T03:44:17.043Z","status":"ssl_error","status_checked_at":"2026-02-05T03:44:12.077Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T00:26:54.068Z","updated_at":"2026-02-05T04:33:28.809Z","avatar_url":"https://github.com/qbit.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- Code generated by gomarkdoc. DO NOT EDIT --\u003e\n\n# hostkeydns\n\n```go\nimport \"suah.dev/hostkeydns\"\n```\n\nPackage hostkeydns facilitates verifying remote ssh keys using DNS and SSHFP resource records\\.\n\n## Index\n\n- [func CheckDNSSecHostKey(dr DNSSecResolvers) ssh.HostKeyCallback](\u003c#func-checkdnssechostkey\u003e)\n- [func CheckDNSSecHostKeyEZ(res string) ssh.HostKeyCallback](\u003c#func-checkdnssechostkeyez\u003e)\n- [type DNSSecResolvers](\u003c#type-dnssecresolvers\u003e)\n\n\n## func CheckDNSSecHostKey\n\n```go\nfunc CheckDNSSecHostKey(dr DNSSecResolvers) ssh.HostKeyCallback\n```\n\nCheckDNSSecHostKey checks a hostkey against a DNSSEC SSHFP records\\.\n\n\u003cdetails\u003e\u003csummary\u003eExample\u003c/summary\u003e\n\u003cp\u003e\n\n```go\npackage main\n\nimport (\n\t\"golang.org/x/crypto/ssh\"\n\t\"suah.dev/hostkeydns\"\n)\n\nfunc main() {\n\tdnsConf := hostkeydns.DNSSecResolvers{\n\t\tServers: []string{\n\t\t\t\"8.8.8.8\",\n\t\t},\n\t\tPort: \"53\",\n\t\tNet:  \"tcp\",\n\t}\n\tconfig := \u0026ssh.ClientConfig{\n\t\tHostKeyCallback: hostkeydns.CheckDNSSecHostKey(dnsConf),\n\t}\n\t_, _ = ssh.Dial(\"tcp\", \"github.com:22\", config)\n}\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## func CheckDNSSecHostKeyEZ\n\n```go\nfunc CheckDNSSecHostKeyEZ(res string) ssh.HostKeyCallback\n```\n\nCheckDNSSecHostKeyEZ checks a hostkey against a DNSSEC SSHFP records using preconfigured name servers\\. Options are: \\- \"quad9\": https://www.quad9.net/\\. \\- \"google\": Google's public name servers\\. \\- \"system\": Use the system resolver \\(\\*nix only atm\\)\\.\n\n\u003cdetails\u003e\u003csummary\u003eExample\u003c/summary\u003e\n\u003cp\u003e\n\n```go\npackage main\n\nimport (\n\t\"golang.org/x/crypto/ssh\"\n\t\"suah.dev/hostkeydns\"\n)\n\nfunc main() {\n\tconfig := \u0026ssh.ClientConfig{\n\t\tHostKeyCallback: hostkeydns.CheckDNSSecHostKeyEZ(\"quad9\"),\n\t}\n\t_, _ = ssh.Dial(\"tcp\", \"github.com:22\", config)\n}\n```\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## type DNSSecResolvers\n\nDNSSecResolvers exposes configuration options for resolving hostnames using DNSSEC\\. Success will be called when a matching fingerprint/SSHFP match is found\\. Net can be one of \"tcp\"\\, \"tcp\\-tls\" or \"udp\"\\.\n\nIf set\\, HostKeyAlgorithms will restrict matching to \\_only\\_ the algorithms listed\\. The format of the strings match that of OpenSSH \\(\"ssh\\-ed25519\" for example\\)\\.\n\n```go\ntype DNSSecResolvers struct {\n    Servers           []string\n    Port              string\n    Net               string\n    Success           func(key ssh.PublicKey)\n    HostKeyAlgorithms []string\n}\n```\n\n\n\nGenerated by [gomarkdoc](\u003chttps://github.com/princjef/gomarkdoc\u003e)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbit%2Fhostkeydns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqbit%2Fhostkeydns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqbit%2Fhostkeydns/lists"}