When I open .ppk or .pub files (in my ~/.ssh directory), I'm unable to view the data. All I see are boxes as shown below. How do I fix this?
1 Answers
EDIT: Please note there are actually two versions of PPK files at play - one is the "older" binary one, and one is the newer "readable" one.
PPK files are Putty Private Key files, readable by PuttyGEN and Putty. In older PPK generated versions, they are stored as binary files, meaning they do not have any human-readable bits in them.
If you intend to read the contents of an old-style PPK, such as the specific private key bits that you'd find with an ssh-keygen'd private key, you need to convert the PPK to OpenSSH format and then read the Base64'd ASCII.
This applies for the Public Key file as well, though it's in SSH2 format which is not the format that'll work for SSH.
In newer versions of PuttyGEN and Putty(and not in the repos for Linux at this time), the PPK file is human readable to an extent. This means that in the latest PuTTY, you can read the PPK and Public Key as human readable.
However I have not found this 'newer' PuTTY on Linux yet, and only have found those binaries on Linux.
Also, without actually examining the files themselves, I can't determine whether the file you think is a PPK or a public key is actually a key that you can easily properly read or not; some keys are in 'binary form' and not openable, and those're either old PPK files or not the files you think they are and therefore aren't human readable (identification certificates for example can be used with OpenSSH connections, and if the certificate is in DER format it's in binary non-human-readable format).
- 78,878
