Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1426709 - [RFE] Alternate port for SSH for certain hosts
[RFE] Alternate port for SSH for certain hosts
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Remote Execution (Show other bugs)
6.2.9
Unspecified Unspecified
unspecified Severity unspecified (vote)
: 6.2.9
: Unused
Assigned To: Ivan Necas
jcallaha
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-02-24 11:19 EST by pm-sat@redhat.com
Modified: 2017-05-01 10:00 EDT (History)
4 users (show)

See Also:
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-01 10:00:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 15214 None None None 2017-02-24 11:19 EST
Red Hat Product Errata RHBA-2017:1191 normal SHIPPED_LIVE Satellite 6.2.9 Async Bug Release 2017-05-01 13:49:42 EDT

  None (edit)
Description pm-sat@redhat.com 2017-02-24 11:19:02 EST
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 pm-sat@redhat.com 2017-02-24 11:19:06 EST
Created from redmine issue http://projects.theforeman.org/issues/15214
Comment 2 Ivan Necas 2017-03-03 04:05:19 EST
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 16:50:46 EDT
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 16:13:25 EDT
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 16:14 EDT
Created attachment 1272727 [details]
verification screenshot 1
Comment 8 jcallaha 2017-04-19 16:15 EDT
Created attachment 1272728 [details]
verification screenshot 2
Comment 10 errata-xmlrpc 2017-05-01 10:00:39 EDT
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.