大网数据广告活动
服务器运维问答

How do I generate an SSHFP record from a remote ssh server (like a router)?

· 52CE 我爱测

How do I generate an SSHFP DNS records for a server like a router that does not give you direct access to their keys in a format that ssh-keygen -r machine understands? The ssh-keygen -r machine reads private keys on the local ma…

问题原文

原帖链接 · Graham Leggett · CC BY-SA 4.0

How do I generate an SSHFP DNS records for a server like a router that does not give you direct access to their keys in a format that ssh-keygen -r machine understands?

The ssh-keygen -r machine reads private keys on the local machine.

已采纳解答

原帖链接 · Graham Leggett · CC BY-SA 4.0

To generate an SSHFP record for a remote ssh server, run the following tool:

Little-Net:~ minfrin$ ssh-keyscan -D machine.example.com
; machine.example.com:22 SSH-2.0-ROSSSH
; machine.example.com:22 SSH-2.0-ROSSSH
machine.example.com IN SSHFP 1 1 d9d29098100fe5ebbb7d912a5b0d8cc13a32f557
machine.example.com IN SSHFP 1 2 61ac073f5cdfd6957f61d0af26450717d4eb59c2b02a6798410003d0dada7dcf
; machine.example.com:22 SSH-2.0-ROSSSH

From ssh-keyscan man page:

 -D      Print keys found as SSHFP DNS records.  The default is to print keys in a format usable as a ssh(1) known_hosts file.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-09-08)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。