Description of problem: Modify the public ssh key with removing the key type in the beginning of the id_rsa.pub. Then try to add the invalid key to my account. Some garbage strings will show in the warning message. Version-Release number of selected component (if applicable): rhc-1.11.2 devenv_3463 How reproducible: always Steps to Reproduce: 1.Remove the key type in a public ssh key 2.Add the above public key via rhc client rhc sshkey add key ~/.ssh/invalid_id_rsa.pub 3. Actual results: $ rhc sshkey add key1 invalid_id_rsa.pub -d DEBUG: Using config file /home/bmeng/.openshift/express.conf DEBUG: #<NotImplementedError: unsupported key type `ZjXh��hq�]�f�'> File 'invalid_id_rsa.pub' does not appear to be a recognizable key file (unsupported key type `ZjXh��hq�]�f�'). You may specify the '--confirm' flag to add the key anyway. Expected results: Should not show the garbage strings. Additional info: See also: https://bugzilla.redhat.com/show_bug.cgi?id=953473 This bug reported the related issue and marked as Won't fix. But the output is more ugly for now.
Because of the way that OpenSSL is designed, we have no way of handling this beyond what we do today. There are many types of keys, and we don't know whether a key will always have a visible type. So we can't filter out the garbage characters.