Bug 1842957

Summary: id_rsa for foreman-proxy not created on installation
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: Remote ExecutionAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Peter Ondrejka <pondrejk>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.8.0CC: aruzicka, inecas
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
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: 2020-06-08 14:29:45 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 Lukáš Hellebrandt 2020-06-02 12:58:45 UTC
Description of problem:
The ssh keypair of foreman-proxy is not created on Satellite installation, even when parameter '--foreman-proxy-plugin-remote-execution-ssh-install-key' is used. Consequently, Satellite can't ReX against itself.

Version-Release number of selected component (if applicable):
Sat 6.8 snap 2.1

How reproducible:
Deterministic

Steps to Reproduce:
1. # satellite-installer --foreman-proxy-plugin-remote-execution-ssh-install-key

Actual results:
Can't SSH to root@<satellite> because:
```
Failed to connect to the host via ssh: Warning: Permanently added 'dhcp-2-205.vms.sat.rdu2.redhat.com,10.1.2.205' (ECDSA) to the list of known hosts.\r\nno such identity: /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy: No such file or directory\r\nPermission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
```

Expected results:
SSH keypair created, copied to root's authorized_keys

Comment 1 Adam Ruzicka 2020-06-02 13:03:32 UTC
This is a side effect of https://bugzilla.redhat.com/show_bug.cgi?id=1842943. The key gets generated into /var/lib/foreman-proxy/ssh, however packaging deploys ~foreman-proxy/.ssh as a symlink to /usr/com/something.

Comment 2 Brad Buckingham 2020-06-04 14:37:10 UTC
Hi Adam,

Are you saying bug 1842943 will solve this one?  If so, shall we close:dupe this one?

Comment 3 Adam Ruzicka 2020-06-08 14:29:45 UTC
I believe it should, let's close this one.

*** This bug has been marked as a duplicate of bug 1842943 ***