Skip to content

Incorrect ssh command syntax #9733

@swapdisk

Description

@swapdisk

Describe the bug
When setting the ssh_command var with a destination port number, the command syntax is incorrect.

To Reproduce
Steps to reproduce the behavior:

  1. Deploy a config that provisions an environment including an ssh command example for connecting to a specific port number, for example, a RHEL lab hosted on CNV.
  2. Observe that the ssh_command var is set using ssh user@destination -p port syntax.

Expected behavior
Use correct ssh command syntax as found in OpenSSH documentation. This could be either:

  1. The traditional command syntax with options first followed by user@hostname destination, that is ssh -p port user@destination, or
  2. The more modern way using a destination URI like ssh ssh://user@hostname:port.

The URI syntax was introduced in 2018 with OpenSSH 7.7, so surely that should be good for everybody today.

Affected code

Additional context
My preference would be the more modern URI syntax, but happy to consider community input.

Unless there are any objections, I'll open a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions