RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1478828 - Connecting to remote servers with non-standard ssh port fails
Summary: Connecting to remote servers with non-standard ssh port fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: cockpit
Version: 7.4
Hardware: All
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Martin Pitt
QA Contact: qe-baseos-daemons
URL: https://github.com/cockpit-project/co...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-07 08:29 UTC by Martin Pitt
Modified: 2017-10-19 15:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
When using the Cockpit interface to connect to a remote host using an SSH port other than 22, the connection failed and displayed the following error message: Failed to add machine: Unexpected type 'int' in argument" This update fixes the underlying code, and using a non-standard SSH port for a Cockpit connection now works correctly.
Clone Of:
Environment:
Last Closed: 2017-10-19 15:13:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2936 0 normal SHIPPED_LIVE cockpit bug fix update 2017-10-19 18:49:27 UTC

Description Martin Pitt 2017-08-07 08:29:26 UTC
Description of problem:


Version-Release number of selected component (if applicable):

cockpit-system-138-9.el7.noarch

How reproducible:


Steps to Reproduce:
1. Set up or find a computer/vm/container with an ssh server that listens on a port other than 22. For testing you could just add "Port 600" to /etc/ssh/sshd_config, run "setenforce 0" and "systemctl stop sshd; systemctl start sshd" on the Cockpit machine.
2. Open Cockpit (e. g. https://localhost:9090) and log in
3. Change the URL to log in to the above remote host. In the scenario above this would be <https://localhost:9090/@127.0.0.1:600>. If you used another remote host, it would look like <https://localhost:9090/@my.remote.host:123>
4. Assuming that you never connected to that machine before, you will then get a "Couldn't connect to the machine" (unknown machine) warning with a Troubleshoot button. Click it.
5. Click the "Add machine" button in the troubleshoot dialog.

Actual results:

In step 5 the dialog will show an error "Failed to add machine: Unexpected type 'int' in argument".

Expected results:

In step 5 the dialog would close, the Cockpit UI changes to show the remote host, and /etc/cockpit/machines.d/99-webui.json has the new remote host with the appropriate port.


Additional info:

 * This does NOT happen when adding the remote host on the Dashboard (cockpit-dashboard package in Extras), which is the much more common way to talk to remote machines in Cockpit. Thus setting "Low" severity (but adjust as you see fit).

 * This got fixed upstream in Cockpit 140 by https://github.com/cockpit-project/cockpit/pull/6466 with a rather straightforward fix and a reproducer in the test suite.

Comment 2 Martin Pitt 2017-08-07 08:32:28 UTC
Failed test case on RHEL 7.4 Cockpit CI image: https://fedorapeople.org/groups/cockpit/logs/pull-7437-20170802-215959-249cd711-verify-rhel-7-4/log.html#95

Testing this particular feature got disabled in https://github.com/cockpit-project/cockpit/commit/66de1a701af#diff-20ae85add0c82e620f1b62a305dcae09L137 ; once the fix lands in RHEL 7.4, the test case should be re-enabled.

Comment 8 errata-xmlrpc 2017-10-19 15:13:55 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:2936


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