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
, not the private key. You need to generate a public key from the private key. The accepted answer here will show you how: serverfault.com/questions/52285/….ssh -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.