【发布时间】:2020-04-07 02:45:21
【问题描述】:
我在~/.ssh/id_rsa 下有一个私钥。运行ssh-keygen -l -f ~/.ssh/id_rsa 确认密钥有效。
我正在尝试创建另一个包含此密钥的文件。例如,
cp ~/.ssh/id_rsa ~/.ssh/id_rsa.dupe
chmod 0400 ~/.ssh/id_rsa (to make permissions the same for both files)
但是当我运行ssh-keygen -l -f ~/.ssh/id_rsa.dupe 时,我得到~/.ssh/id_rsa.dupe is not a key file.
【问题讨论】:
-
对于与编写代码无关的问题,Unix & Linux 或 Super User 是更好的选择。
-
也就是说——当您读取或 md5sum 文件时,这是否确认它们是相同的?
-
注意——谢谢@CharlesDuffy。是的,运行 md5sum 会为每个文件返回相同的哈希值。