Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2134283 - SSH key passphrase is not working if password was set previously
Summary: SSH key passphrase is not working if password was set previously
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.11.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: 6.13.0
Assignee: Adam Ruzicka
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-10-13 05:23 UTC by matt jia
Modified: 2023-05-12 16:33 UTC (History)
2 users (show)

Fixed In Version: rubygem-smart_proxy_remote_execution_ssh-0.8.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-03 13:22:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 34894 0 Normal Closed Be more explicit about SSH connection handling 2022-10-13 09:19:50 UTC
Red Hat Issue Tracker SAT-14270 0 None None None 2022-12-07 11:51:16 UTC
Red Hat Product Errata RHSA-2023:2097 0 None None None 2023-05-03 13:23:24 UTC

Description matt jia 2022-10-13 05:23:00 UTC
Description of problem:

As $subject, the issue is similar to this upstream ticket:

https://community.theforeman.org/t/remote-execution-fails-to-use-ssh-key/28395

Foreman issue:

https://projects.theforeman.org/issues/34867

As mentioned in the ticket, a workaround is to explicitly set password to nil:

~~~
echo 'Setting[:remote_execution_ssh_password] = nil' | foreman-rake console 
~~~

and restart the services.


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


How reproducible:

Easy

Steps to Reproduce:
1. set Default SSH password
2. set Default SSH key passphrase
3. remove Default SSH passord
4. run a REX job

Actual results:

the job hangs and sshd debug shows the last line:

Postponed publickey for xxx from xxxxx port 39250 ssh2 [preauth]

Expected results:

the job should finish successfully. 



Additional info:

Comment 1 Adam Ruzicka 2022-10-13 09:19:51 UTC
There was a limitation in smart_proxy_remote_execution_ssh in versions >=0.5.0 and <0.8.0 which prevented the users from using both password and key passphrase, if both were provided one of them "won". Sadly, an empty value was still considered a value.

smart_proxy_remote_execution_ssh-0.8.0 contains reworked connection handling, which among other things, removes the limitation mentioned above.

> and restart the services.

That should not be necessary

Comment 2 matt jia 2022-10-13 09:49:21 UTC
(In reply to Adam Ruzicka from comment #1)
> 
> smart_proxy_remote_execution_ssh-0.8.0 contains reworked connection
> handling, which among other things, removes the limitation mentioned above.

Is smart_proxy_remote_execution_ssh-0.8.0 going to be landed on Satellite 6.12?

> > and restart the services.
> 
> That should not be necessary

Yeah, but it is what happened as reported by the customer. It does seem like the password got cached somehow...

Comment 3 Adam Ruzicka 2022-10-13 09:52:46 UTC
> Is smart_proxy_remote_execution_ssh-0.8.0 going to be landed on Satellite 6.12?

That's highly unlikely, 6.12 is built around the 0.7.z line

Comment 4 matt jia 2022-10-13 10:06:57 UTC
(In reply to Adam Ruzicka from comment #3)
> > Is smart_proxy_remote_execution_ssh-0.8.0 going to be landed on Satellite 6.12?
> 
> That's highly unlikely, 6.12 is built around the 0.7.z line

Fair enough. Luckily, we have a valid workaround here, :-)

Comment 7 Peter Ondrejka 2023-01-09 14:05:24 UTC
Verified on Satellite 6.13 snap 5, rex jobs are no longer hanging in the aforementioned scenario

Comment 10 errata-xmlrpc 2023-05-03 13:22:16 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.13 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2023:2097


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