Bug 1480475

Summary: [RHUI 3.0] Installation and registration of CDS fails when ssh key pair is created with a passphrase.
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: Tapomoy Bhowmik <tbhowmik>
Component: DocumentationAssignee: Les Williams <lwilliam>
Status: CLOSED ERRATA QA Contact: Radek Bíba <rbiba>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: igulina, matti.koskimies, tsanders
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-09-11 12:26:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tapomoy Bhowmik 2017-08-11 08:43:38 UTC
Document URL: https://access.redhat.com/documentation/en-us/red_hat_update_infrastructure/3.0/single/system_administrators_guide/#generate_keypair


Section Number and Name: 

Point number 3 under section "6.1.1. RSA Key Pair for Version 2 of the SSH Protocol"
Point number 3 under section "6.1.2. ECDSA Key Pair for Version 2 of the SSH Protocol"


Describe the issue: 

As per the documentation of RHUI 3.0 System Administrator's Guide [6.1. GENERATE AN RSA KEY PAIR] under point 3 of section 6.1.1 and 6.1.2, it is mentioned that we need to enter a password while generating RSA Key Pair or ECDSA Key Pair. If we will create the key pair using a passphrase then RHUI won't be able to decrypt it and the installation and registration of CDS will fail.

We will get the below error in ~/.rhui/rhui.log:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Failed to authenticate with the SSH server at cdsuser@rhcds1:22
using the private key /root/.ssh/id_rsa.
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 88, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python2.7/site-packages/rhui/tools/shell.py", line 127, in listen
    Shell.listen(self)
  File "/usr/lib/python2.7/site-packages/rhui/common/shell.py", line 186, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.7/site-packages/rhui/tools/screens/instances.py", line 191, in register
    self._register(new_instance, ssh_policy, force=force)
  File "/usr/lib/python2.7/site-packages/rhui/tools/screens/instances.py", line 239, in _register
    private_key=ssh_keyfile)
RhuiException: Failed to authenticate with the SSH server at cdsuser@rhcds1:22
using the private key /root/.ssh/id_rsa.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Suggestions for improvement: 

Need to modify the document mentioning that we should not provide any passphrase when asked for rather we should keep it as blank. Also, a note should be provided that if a passphrase is provided while generating key pair then the installation and registration of CDS will fail.


Additional information: