UPDATED
When I am trying to generate a public key it still gives me an error "error in libcrypto"
Load key "breakthis": error in libcrypto
Private key is given below
I am trying to solve a Hack the box machine
I was able to get a private key then I converted that private key into a hash for JOHNTHERIPPER and cracked it successfully
But now when I try to login in through ssh I am getting the following error I have searched a lot but not able to resolve these error
ssh -i id_rsa [email protected]
load pubkey "id_rsa": invalid format
Load key "id_rsa": error in libcrypto
[email protected]'s password:
~.ssh/.config
seems to cause cause theerror in libcrypto
for me as long as that key is not loaded by a running SSH agent. It happened for me when my keeagent crashed. However, restarting the agent seems to allow such setup as mentioned in heressh -i ~/.ssh/id_rsa.pub
(or equivalent) and see what happens. You needssh -i ~/.ssh/id_rsa
. You can use thefile
command on the key files to see what kind of key they are. Indeed, the server needs your public key in its known_hosts for you to connect, but that is a one-time operation and is not a routine part of establishing SSH connections to a server.