You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rig is trying to be too clever with getting host settings from the ssh config by first querying for host:port and if that fails, by trying host only.
The alias/pattern/key in ssh config is not host:port. In fact, you can have something like:
Host 127.0.0.1:33
HostName 127.0.0.1
Port 45
==>
$ ssh -v 127.0.0.1:33debug1: Reading configuration data /Users/kimmo/.ssh/configdebug1: /Users/kimmo/.ssh/config line 7: Applying options for 127.0.0.1:33debug1: /Users/kimmo/.ssh/config line 18: Applying options for *debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 47: Applying options for *debug1: Connecting to 127.0.0.1 [127.0.0.1] port 45.
The port is only parsed from -p:
$ ssh -v root@127.0.0.1:33 -p 2222debug1: Reading configuration data /Users/kimmo/.ssh/configdebug1: /Users/kimmo/.ssh/config line 7: Applying options for 127.0.0.1:33debug1: /Users/kimmo/.ssh/config line 13: Applying options for *debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 47: Applying options for *debug1: Connecting to 127.0.0.1 port 2222.
$ ssh -v 127.0.0.1:12345 -p33debug1: Reading configuration data /Users/kimmo/.ssh/configdebug1: /Users/kimmo/.ssh/config line 13: Applying options for *debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 47: Applying options for *debug1: resolve_canonicalize: hostname 127.0.0.1:12345 is an unrecognised addressdebug1: Connecting to 127.0.0.1:12345 port 33.
So, in the case of config like this:
ssh:
address: 127.0.0.1port: 40user: bob
And ssh config like this:
Host 127.0.0.1
Port 45
Host local
Port 40
HostName 127.0.0.1
User foo
What should rig do?
query for 127.0.0.1 in the config and discard anything found in there unless port is 40 and user is bob also in ssh config?
query for 127.0.0.1 in the config and overwrite any rig settings with the ones from ssh config?
query for 127.0.0.1 in the config and overwrite any ssh config values with what is in rig config?
query for 127.0.0.1 in the config and error out if there's a mismatch between rig and ssh config?
query for all hosts, find one with HostName 127.0.0.1, user bob and port 40?
introduce something like ssh.host and overwrite anything received with what is in rig config?
I think the best choice is number 3. It's pretty close to what command line ssh does without losing any ssh config functionality unless specifically using the host field in 6.
The text was updated successfully, but these errors were encountered:
Rig is trying to be too clever with getting host settings from the ssh config by first querying for
host:port
and if that fails, by tryinghost
only.The alias/pattern/key in ssh config is not host:port. In fact, you can have something like:
==>
The port is only parsed from
-p
:So, in the case of config like this:
And ssh config like this:
What should rig do?
127.0.0.1
in the config and discard anything found in there unless port is 40 and user is bob also in ssh config?127.0.0.1
in the config and overwrite any rig settings with the ones from ssh config?127.0.0.1
in the config and overwrite any ssh config values with what is in rig config?127.0.0.1
in the config and error out if there's a mismatch between rig and ssh config?ssh.host
and overwrite anything received with what is in rig config?I think the best choice is number 3. It's pretty close to what command line ssh does without losing any ssh config functionality unless specifically using the
host
field in 6.The text was updated successfully, but these errors were encountered: