beaker icon indicating copy to clipboard operation
beaker copied to clipboard

ssh_config file not used by default

Open sbeaulie opened this issue 3 years ago • 3 comments

Current code has an unexpected behavior: https://github.com/voxpupuli/beaker/blob/master/lib/beaker/options/presets.rb#L197-L198

NET:SSH documentation sets it to true by default https://net-ssh.github.io/net-ssh/classes/Net/SSH.html#method-c-start states

config => set to true to load the default OpenSSH config files (~/.ssh/config, /etc/ssh_config), or to false to not load them, or to a file-name (or array of file-names) to load those specific configuration files. Defaults to true.

Could we set it to true and optionally turn it off (current behavior) via an option flag? I don't think in most cases it would be a breaking change to respect the ssh_config file, but we could release a major version bump and document the change?

In my case it would be easier to have it default to true than having to change all the existing beaker usage specifically to turn it on via a new option flag.

sbeaulie avatar Feb 17 '22 18:02 sbeaulie

@bastelfreak I'd like to get your opinion on this

sbeaulie avatar Feb 17 '22 18:02 sbeaulie

theoretically it would be a breaking change and I am not sure about the impact. @ekohl do you have any thoughts on this?

Edit: I'm fine with making this configureable, but I'm unsure about the default value. Avoiding breaking changes is usually our approach, if possible.

bastelfreak avatar Feb 23 '22 08:02 bastelfreak

I would definitely make it configurable but not change the default.

Beaker does a lot under the hood to ensure a clean connection to managed host clusters without interruption from outside sources. IMO the only time it should be set by default if you're targeting a non-manged host.

trevor-vaughan avatar Mar 20 '22 18:03 trevor-vaughan