Bug 1546540

Summary: [Docs][RFE][Metrics Install] Document retrieving public key for ssh between Manager and Metrics Store
Product: Red Hat Enterprise Virtualization Manager Reporter: Emma Heftman <eheftman>
Component: DocumentationAssignee: Emma Heftman <eheftman>
Status: CLOSED CURRENTRELEASE QA Contact: Avital Pinnick <apinnick>
Severity: high Docs Contact:
Priority: high    
Version: 4.2.0CC: apinnick, didi, lsurette, rbalakri, sradco, srevivo, ykaul
Target Milestone: ovirt-4.2.3Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: docs-accepted
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-26 14:02:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Docs RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1507294    
Bug Blocks: 1552582    

Description Emma Heftman 2018-02-18 13:42:35 UTC
ssh engine server
2. retrieve the public key from a SSH private key
 # cd /etc/pki/ovirt-engine/keys/
 # ssh-keygen -y -f engine_id_rsa > /tmp/engine_id_rsa.pub
 # ssh-copy-id -i engine_id_rsa.pub root@rhevh_host

In addition, Didi wants to save it as a temp. file.
Need to get updated instructions for how to do thisl

Comment 1 Emma Heftman 2018-02-20 14:30:25 UTC
Hi Shirly
Do you have the updated procedure for saving the key as a temp file?

Comment 2 Shirly Radco 2018-02-20 19:02:40 UTC
Didi, we need to supply the user the step he needs to to to exchange the keys between engine and the metrics store machine. Can you help provide them ?

# mytemp=$(mktemp -d)

# cd /etc/pki/ovirt-engine/keys/

# ssh-keygen -y -f /etc/pki/ovirt-engine/keys/engine_id_rsa > $mytemp/engine_id_rsa.pub

#ssh-copy-id -i $mytemp/engine_id_rsa.pub root@machine
rm -rf $mytemp


This did not work for me.

Comment 3 Yedidyah Bar David 2018-02-22 11:18:02 UTC
Seems like ssh-copy-id looks for the private key in the same directory (unless we use '-f', which I think we do not want to). So something like this should work:

# mytemp=$(mktemp -d)

# cp /etc/pki/ovirt-engine/keys/engine_id_rsa $mytemp

# ssh-keygen -y -f $mytemp/engine_id_rsa > $mytemp/engine_id_rsa.pub

# ssh-copy-id -i $mytemp/engine_id_rsa.pub root@machine

It should ask for root password (on first attempt), supply it

# rm -rf $mytemp

To test:

# ssh -i /etc/pki/ovirt-engine/keys/engine_id_rsa root@dwh hostname

Comment 4 Shirly Radco 2018-03-04 08:45:29 UTC
This works for me

Comment 11 Avital Pinnick 2018-03-25 12:03:47 UTC
Reviewed and merged