-1

I've been trying to complete a CTF on HackTheBox and at some point I get a openssh private key that I can then use to connect as root through ssh. The command I use is "ssh -i id_rsa root@<IP_ADDRESS>" by the way but I'm almost sure that's not the issue. The thing is I get this private key under pdf format and I've been trying a lot of stuff to create a file id_rsa from it but everytime I get this reply from ssh : load pubkey "id_rsa": invalid format Load key "id_rsa": invalid format So I don't know where the problem comes from, if it's a matter of space or .. The file I create (id_rsa) has no extension. Thank you very much

1 Answers1

-1

You would probably need to create a .pub file with the pdf content. And if needed give the right permission for usage chmod 600 file

Alfredo Neto
  • 24
  • 1
  • 5
  • Thank you for your answer, I did the chmod part, the thing is the key I have is a private one and thats what I need for my ssh connection – LoLo Voulzy Mar 10 '21 at 23:39
  • Think this thread could help you more: https://superuser.com/questions/1370877/ssh-error-loading-key-id-rsa-invalid-format – Alfredo Neto Mar 11 '21 at 05:01