我使用PuttyGen创建了公钥和私钥,然后使用公钥对消息进行加密。我现在正在尝试使用私钥和以下命令来解密这样的消息:
echo [my encrypted message] | openssl enc -d -base64 -A | openssl rsautl -decrypt -inkey ~/.ssh/private.ppk但是我得到了一个错误:
unable to load Private Key
6870300:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c:707:Expecting: ANY PRIVATE KEY私钥如下所示(省略了实际密钥):
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: rsa-key-20170724
Public-Lines: 6
[...]
Private-Lines: 14
[...]
Private-MAC: [...]怎么了?
发布于 2017-09-05 18:11:09
多亏了this guy,我解决了这个问题。
我使用PuttyGen重新打开私钥并导出为OpenSSH,然后使用这个新文件解密消息。
https://stackoverflow.com/questions/46052241
复制相似问题