Skip to content

ssh-ng://host:port treats host:port as the hostname #7044

@kjeremy

Description

@kjeremy

Describe the bug

I would expect ssh-ng://host:port as in ssh-ng://127.0.0.1:5000 to communicate over ssh via port 5000. Instead it treats it as part of the hostname.

nix store ping --store ssh-ng://127.0.0.1:5000
"ssh: Could not resolve hostname 127.0.0.1:5000: Name or serice not known"

Steps To Reproduce

  1. nix store ping --store ssh-ng://host:port

Expected behavior

This should succeed if the ssh daemon is running on the expected port.

nix-env (Nix) 2.11.0

Additional context

A workaround is to set NIX_SSHOPTS to "-p port" in the environment but this doesn't work well for global configuration like substituters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions