Load Key "Privkey. Ppk" Invalid Format

Load Key "Privkey. Ppk" Invalid Format

What have I done:
I'm trying to connect to my remote server with private key with

ssh -i privkey.ppk root@ip

But it's returning an error.
Error message:

Load key "privkey.ppk": invalid format
root@ip: Permission denied (publickey).

Expected result:
I should be able to login into my remote server with ssh key.

Key file content:

PuTTY-User-Key-File-2: ssh-rsa
Encryption: aes256-cbc
Comment: rsa-key-20181019
Public-Lines: 6
some lines
Private-Lines: 14
some lines
Private-MAC: some letters

OS: Ubuntu 18.04

(p.s:

  1. I'm using the same key in putty, termius to login into my remote server and its working fine
  2. Ansible ping cmd also returning the same result)

1 Answer

My PPK was in putty PPK format I had to convert into OpenSSH format.
I converted .ppk to OpenSSH using this answer, now I'm able to connect.

puttygen id_dsa.ppk -O public-openssh -o id_dsa.pub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.