Bug 1376772

Summary: [RFE] Remote job should allow ssh as non-root@<target.system>
Product: Red Hat Satellite Reporter: Anand Agrawal <aagrawal>
Component: Remote ExecutionAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: bbuckingham, inecas, jcallaha, mburgerh
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-19 10:48:23 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:

Description Anand Agrawal 2016-09-16 11:30:51 UTC
1. Proposed title of this feature request  
    Remote job should allow ssh as non-root@<target.system>

When executing remote command from Satellite, non-root user should be allowed to ssh to the system.
  
2. Who is the customer behind the request?  
    Name        Rhodix Dispatch
    Account:    Koninklijke Bibliotheek
    TAM customer: No  
    Strategic: No  


  
3. What is the nature and description of the request?  
   The remote job does the ssh as root@<target.system>, which is not acceptable.
   How can customer change the user which performs the SSH?


4 How would the customer like to achieve this? (List the functional requirements here)  
    Customer would like to run remote execution using ssh for non root user.

  
6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.  
    1. From Satellite, copy the foreman 'id_rsa_foreman_proxy.pub'

      ssh-copy-id -i ~foreman-proxy/.ssh/id_rsa_foreman_proxy.pub non-root.com
    
    2. Go to Host > All Host

    3. Select Host you want to execute remote job
 
    4. click on "Run Job"
    
    5. Select the command you want to execute, select effective user (non-root)

  
7. Is there already an existing RFE upstream or in Red Hat Bugzilla?  
    NO
  
8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?  
    No
  
9. Is the sales team involved in this request and do they have any additional input?  
    No

10. List any affected packages or components.  
    Remote Execution
  

11. Would the customer be able to assist in testing this functionality if implemented?  
    Yes

12. Actual results:
 1: Error initializing command #
 2: Net::SSH::AuthenticationFailed Authentication failed for user root.9.193
 3: Exit status: EXCEPTION



13. Expected results:
Non root user should be able to ssh to the system

Comment 1 Maxim Burgerhout 2016-09-16 12:10:09 UTC
This is exactly what remote_execution_ssh_user does, right? You can that at the global level through Settings -> RemoteExecution, or as a host parameter.

Comment 4 Ivan Necas 2016-09-19 10:51:46 UTC
It turns out we already have that even documented in https://access.redhat.com/documentation/en/red-hat-satellite/6.2/paged/host-configuration-guide/113-configuring-global-settings