The foreman-proxy SSH key is copied 3 times on the provisioned machine in /root/.ssh/authorized_keys

Solution Verified - Updated -

Environment

  • Red Hat satellite 6.7

Issue

  • The foreman-proxy is copied 3 times on the provisioned machine in /root/.ssh/authorized_keys when the remote execution is available.

  • By previewing the remote_execution_ssh_keys snippet , it shows the foreman-proxy keys of the satellite and the capsule 3 times

Resolution

  • Applying the following workaround fixed the issue:

1) Clone the default remote_execution_ssh_keys snippet and edit the following line :

<%= host_param('remote_execution_ssh_keys').is_a?(String) ? host_param('remote_execution_ssh_keys') : host_param('remote_execution_ssh_keys').join("\n") %>

to be :

<%= host_param('remote_execution_ssh_keys').is_a?(String) ? host_param('remote_execution_ssh_keys') : host_param('remote_execution_ssh_keys').uniq.join("\n") %>

2) Edit the provisioning template to use the cloned remote_execution_ssh_keys snippet.

Root Cause

  • The issue is tracked by bugzilla 1856758

Diagnostic Steps

  • After provision a new machine , the foreman-proxy is copied 3 times on the provisioned machine in /root/.ssh/authorized_keys when the remote execution is available.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments