Use paramiko.PKey instead of PublicKey
Parsing OpenSSH public key format
Formatting OpenSSH public key