[Nix#7044] ssh-ng://host:port treats host:port as the hostname #196

Open
opened 2024-03-28 19:33:47 +00:00 by lix-bot · 1 comment
Member

Upstream-Issue: NixOS/nix#7044

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.

Upstream-Issue: https://git.lix.systems/NixOS/nix/issues/7044 **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.
lix-bot added the
bug
imported
labels 2024-03-28 19:33:47 +00:00
Owner

I reproduced this on lix.

I reproduced this on lix.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#196
No description provided.