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 1426709 - [RFE] Alternate port for SSH for certain hosts
Summary: [RFE] Alternate port for SSH for certain hosts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Remote Execution
Version: 6.2.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-02-24 16:19 UTC by Satellite Program
Modified: 2019-09-25 21:20 UTC (History)
4 users (show)

Fixed In Version: rubygem-foreman_openscap-0.5.3.19-1, smart_proxy_remote_execution_ssh_core-0.1.2.6-1, smart_proxy_remote_execution_ssh-0.1.2.6-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-01 14:00:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
verification screenshot 1 (68.08 KB, image/png)
2017-04-19 20:14 UTC, jcallaha
no flags Details
verification screenshot 2 (48.40 KB, image/png)
2017-04-19 20:15 UTC, jcallaha
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 15214 0 Normal Closed Alternate port for SSH for certain hosts 2021-01-27 09:42:54 UTC
Red Hat Product Errata RHBA-2017:1191 0 normal SHIPPED_LIVE Satellite 6.2.9 Async Bug Release 2017-05-01 17:49:42 UTC

Description Satellite Program 2017-02-24 16:19:02 UTC
Would be great if there was a way to specify a custom port for certain hosts when using remote execution over SSH (like: ssh -p 22222 user@host).

Comment 1 Satellite Program 2017-02-24 16:19:06 UTC
Created from redmine issue http://projects.theforeman.org/issues/15214

Comment 2 Ivan Necas 2017-03-03 09:05:19 UTC
Steps to verify:

Scenario 1 - change ssh port on per-host basis:

1. configure some host to listen for ssh on different port
2. set remote_execution_ssh_port on host params to the port that corresponds to the port
3. run the job on the host
4. expected results: different port of the particular host was used (for other hosts, 22 port was still used)

Scenario 2 - change the default ssh port:

1. configure some host to listen for ssh on different port
2. set remote_execution_ssh_port in Settings -> RemoteExecution to differnt port (this changes the default port to be used)
3. run the job on the host
4. expected results: the different port was used on all the hosts in the job invocation

Comment 3 jcallaha 2017-04-06 20:50:46 UTC
Failed QA in Satellite 6.2.9 Snap 2.

Job execution still points to port 22. I not only set the ssh port for the host, but also system-wide. However, the error below is still seen regardless of my configuration.

 1: Error initializing command #
 2: Errno::EHOSTUNREACH No route to host - connect(2) for "172.17.0.29" port 22
 3: Exit status: EXCEPTION


-bash-4.2# hammer -u admin -p changeme host update --parameters "remote_execution_ssh_port=5522" --id 2
Host updated

-bash-4.2# hammer -u admin -p changeme host info --id 2
Id:                 2
Name:               re-test1
Organization:       Default Organization
Location:           Default Location
Puppet CA Id:       
Puppet Master Id:   
Cert name:          re-test1
Managed:            no
Installed at:       
Last report:        
Network:            
    IP:  172.17.0.29
    MAC: 02:42:ac:11:00:1d
Network interfaces: 
 1) Id:          7
    Identifier:  eth0
    Type:        interface (primary, provision)
    MAC address: 02:42:ac:11:00:1d
    IP address:  172.17.0.29
    FQDN:
Operating system:   
    Architecture:           x86_64
    Operating System:       RedHat 7.2
    Build:                  no
    Custom partition table:
Parameters:         
    remote_execution_ssh_port => 5522
Additional info:    
    Owner Id:   3
    Owner Type: User
    Enabled:    yes
    Comment:

Comment 6 jcallaha 2017-04-19 20:13:25 UTC
Verified in satellite 6.2.9 Snap 3

Changed ssh port on host to 5522, then updated it using hammer (see comment #3). 

Running Remote Execution commands against the host now successfully target port 5522 when set at the host as well as when set at system level.

Comment 7 jcallaha 2017-04-19 20:14:11 UTC
Created attachment 1272727 [details]
verification screenshot 1

Comment 8 jcallaha 2017-04-19 20:15:06 UTC
Created attachment 1272728 [details]
verification screenshot 2

Comment 10 errata-xmlrpc 2017-05-01 14:00:39 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, 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/RHBA-2017:1191


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