我从需要连接到SFTP的人那里收到了由“ SAP SuccessFactors”生成的公共密钥,但是为了使我导入公共密钥,我需要提供SHA256指纹。
显然,“ SAP SuccessFactors”只能产生MD5指纹。我已经尝试运行该命令
ssh-keygen -lf <path>.fakekeyname.pub
,但我有一个错误
facekeyname.pub不是公共密钥文件
打开公共密钥文件的公共密钥文件,标题说,
begin ssh2 public key
而我习惯于看到SSH-RSA的线条。
事先表示歉意,如果这似乎立即显而易见,但我会真诚地感谢一些指导或建议。
非常感谢!
I received a public key generated by "SAP SuccessFactors" from someone who needs to connect to an SFTP, but in order for me to import the public key, I need to provide a SHA256 fingerprint.
Apparently "SAP SuccessFactors" can only produce an MD5 fingerprint. I've tried running the command
ssh-keygen -lf <path>.fakekeyname.pub
but I get an error
fakekeyname.pub is not a public key file
In opening up the public key file, the header says
begin ssh2 public key
whereas I'm used to seeing something along the lines of ssh-rsa.
Apologies in advance if this seems immediately obvious, but I would sincerely appreciate some guidance or advice.
Thanks very much!
发布评论
评论(1)
您可以使用ssh-keygen。首先,您需要首先将文件转换为PEM格式
,然后可以从中获得SHA256值:
有关参考,请参阅此帖子:获取公共密钥的sha256 hash
编辑:对于酒吧文件,这可以工作
ssh-keygen -e sha256 -lf sample.pub
请参阅如何从Java中的SSH RSA公共钥匙中计算指纹?You can use ssh-keygen. First you would need to convert the file to pem format first
and then you can get the sha256 value from it:
for reference see this post:get SHA256 hash of public key
Edit: For Pub files this could work
ssh-keygen -E sha256 -lf sample.pub
see How to Calculate Fingerprint From SSH RSA Public Key in Java?