Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kjeremy opened this issue Sep 14, 2022 · 1 comment
Open

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

kjeremy opened this issue Sep 14, 2022 · 1 comment
Labels

Comments

@kjeremy
Copy link
Contributor

kjeremy commented Sep 14, 2022

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.

@kjeremy kjeremy added the bug label Sep 14, 2022
@vincentbernat
Copy link
Member

Related to #3425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants