Bug 856038 - Can not display sshkeys on Mac OS X
Can not display sshkeys on Mac OS X
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
2.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: N. Harrison Ripps
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-10 23:33 EDT by Jianwei Hou
Modified: 2015-05-14 22:04 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-09-17 17:30:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jianwei Hou 2012-09-10 23:33:42 EDT
Description of problem:
On Mac OS X, can not display sshkeys using 'rhc sshkey list'

Version-Release number of selected component (if applicable):
OS: Mac OS X
ruby 1.8.7
CLI: rhc-0.98.13


How reproducible:
Always

Steps to Reproduce:
1. rhc sshkey add rsa ~/.ssh/id_rsa.pub
2. rhc sshkey list

  
Actual results:
OpenShiftmatoMacBook-Pro:.ssh OpenShift$ rhc sshkey list
Password: ******
 
 
RESULT:
/Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/rest/key.rb:35:in `fingerprint': undefined method `load_data_public_key' for Net::SSH::KeyFactory:Class (NoMethodError)
        from (erb):3:in `format'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/ssh_key_helpers.rb:70:in `format'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/commands/sshkey.rb:22:in `list'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/commands/sshkey.rb:21:in `each'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/commands/sshkey.rb:21:in `list'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/helpers.rb:219:in `results'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/helpers.rb:190:in `call'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/helpers.rb:190:in `section'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/helpers.rb:207:in `paragraph'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/helpers.rb:217:in `results'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/commands/sshkey.rb:18:in `list'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/commands.rb:103:in `send'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/commands.rb:103:in `to_commander'
        from /Library/Ruby/Gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
        from /Library/Ruby/Gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:180:in `call'
        from /Library/Ruby/Gems/1.8/gems/commander-4.1.2/lib/commander/command.rb:155:in `run'
        from /Library/Ruby/Gems/1.8/gems/commander-4.1.2/lib/commander/runner.rb:402:in `run_active_command'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/command_runner.rb:30:in `run!'
        from /Library/Ruby/Gems/1.8/gems/commander-4.1.2/lib/commander/delegates.rb:7:in `run!'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/lib/rhc/cli.rb:36:in `start'
        from /Library/Ruby/Gems/1.8/gems/rhc-0.98.13/bin/rhc:61
        from /usr/bin/rhc:23:in `load'
        from /usr/bin/rhc:23

Expected results:
Added keys should be displayed correctly

Additional info:
Did not reproduce on Fedora 16/17, Windows 7, Ubuntu, RHEL6.2
Comment 1 Jianwei Hou 2012-09-11 01:15:22 EDT
Added net-ssh version: 

OpenShiftmatoMacBook-Pro:~ OpenShift$ gem list|grep net-ssh
net-ssh (2.0.4, 1.1.4)
net-ssh-gateway (1.0.0)
Comment 2 Jianwei Hou 2012-09-11 02:03:10 EDT
Same problem with 'rhc sshkey show' on Mac OS X
Comment 3 N. Harrison Ripps 2012-09-11 08:50:17 EDT
Assigned
Comment 4 N. Harrison Ripps 2012-09-11 11:12:49 EDT
rhc uses the load_data_public_key() method, which was added to Net::SSH in version 2.0.11. I have updated the rhc gemspec file to enforce this minimum requirement.
Comment 5 Xiaoli Tian 2012-09-12 06:12:06 EDT
This pull request is still not merged, https://github.com/openshift/rhc/pull/156

so it's not fixed in 0.98.14, remove 0.98.14 from fixed in version.

Wait for next version to verify.
Comment 6 Jianwei Hou 2012-09-12 22:17:47 EDT
Verified with rhc-0.99.1 on Mac OS X

Steps:
1. Add an sshkey: rhc sshkey add default ~/.ssh/id_rsa.pub
2. rhc sshkey list

OpenShiftmatoMacBook-Pro:~ OpenShift$ rhc sshkey list
Password: **


RESULT:
       Name: default
       Type: ssh-rsa
Fingerprint: 13:10:95:30:63:a8:4a:00:6b:4b:09:d2:fe:53:81:11

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