Open Warbo opened 6 years ago
I just learned about the NIX_SSHOPTS
env var, which might have been useful instead!
Thanks for writing a detailed issue ticket! I agree we should at-least document this edge-case better. I also think we can do a few things to improve the user experience so you can supply a host string the way you were trying to.
Thanks for the tool. I thought I'd document a problem I ran into using
nix-delegate
, in case it helps others. I found a workaround (specifying the port in~/.ssh/config
), which might be useful for documentation.I have a remote machine accessible via an SSH tunnel on localhost port 22222, but
nix-delegate
doesn't support hostnames likeuser@localhost:22222
:The suggested
ssh
command wouldn't work either, butssh -p 22222 user@localhost
would. I tried passing a-p
option tonix-delegate
but it complained (understandably) that there's no such option.From reading the
nix-delegate
code, I saw that the host gets passed torsync
and I found a stackoverflow answer which suggests specifying the port in~/.ssh/config
. I tried that and it works! The config I added is:Now I can use
desktop
as the host. Maybe this could be suggested either in the README, or if:[0-9]+
is spotted in the host name?