Bug 838441 - The output of listing the removed default key by "rhc-sshkey list" is confusing
The output of listing the removed default key by "rhc-sshkey list" is confusing
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: John (J5) Palmieri
libra bugs
: Triaged
Depends On:
  Show dependency treegraph
Reported: 2012-07-09 02:11 EDT by shjiang
Modified: 2015-05-14 21:59 EDT (History)
5 users (show)

See Also:
Fixed In Version: fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_209
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-06 13:49:06 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description shjiang 2012-07-09 02:11:59 EDT
Description of problem:
The output of listing the removed default key by "rhc-sshkey list" is confused.
I have already removed the default key. but when i list it, the fingerprint prompt is "the key type is not recognized". I cannot figure out if the key is null or someone added wrong type sshkey.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.add a ssh  with default key name
2.remove the default key  in step 1
3.check the output of rhc sshkey list

Actual results:
c:\Users\window7\.ssh>rhc-sshkey  remove -i default
Password: ******

c:\Users\window7\.ssh>rhc-sshkey list
Password: ***

SSH keys
       Name: default
Fingerprint: Key type is not recognized.  Please check this key is valid.

Expected results:
The Fingerprint:The default key is null.

Additional info:
Comment 1 Clayton Coleman 2012-07-09 23:17:44 EDT
We should be filtering the empty key out as long as we are using the old API.  However, given the eventual refactoring of this command to the rest api (which does not expose a default key) we may not fix it this way.
Comment 2 John (J5) Palmieri 2012-10-09 12:46:09 EDT
please test against refactor
Comment 3 joycezhang 2012-10-09 22:08:13 EDT
This bug has been verified and fixed. Please refer to the details as below:

Verified build:
rhc client built from fork_ami_US2597_US2599_US2813_US2817_US2872_US2816_US2814_209

Verified steps:
1.Add a ssh key with default key name
# rhc sshkey add default ~/.ssh/id_rsa.pub 
Password: *


SSH key /root/.ssh/id_rsa.pub has been added as 'default'

# rhc sshkey list

Password: *

       Name: default
       Type: ssh-rsa
Fingerprint: 12:ee:39:ee:ce:f5:8b:76:aa:16:ef:81:f1:73:11:27

Confusing message "Key type is not recognized.  Please check this key is valid." is not shown. So mark it as Verified. Thanks.

2. Remove default key which added in step1
# rhc sshkey remove default
Password: *


SSH key 'default' has been removed

3. Check sshkey list
# rhc sshkey list

Password: *


Note You need to log in before you can comment on or make changes to this bug.