SSH: allow setting `config: false` to ignore local user `~/.ssh/config`
Documents the existing config option so it can be set via Kamal config. Allows setting config: false to ignore users' ~/.ssh/config.
@jeremy are you sure that it exists? I cannot find it, to be honest.
You mean the sshkit config option, or ?
It eventually lands in Net::SSH.start which passes it to Net::SSH.configuration_for to determine which config files to parse.
Can verify by passing config: /some/other/path.conf and verifying the config is parsed or by enabling/disabling and verifying that default config is/isn't parsed (net-ssh defaults to parsing all of %w[ ~/.ssh/config /etc/ssh_config /etc/ssh/ssh_config ]).
@jeremy thanks for the explanation.
I saw this change on the documentation site, but anything else than a boolean isn't accepted.
Specifically this:
Set to [...], or to a file path (or array of paths) to load specific configuration. [...]
ssh:
config: "config/ssh_config"
❯ kamal config
ERROR (Kamal::ConfigurationError): ssh/config: should be a boolean
I tested this on both 2.2.2 and 74a06b0ccda616c86ebe1729d0795f39bcac9f00.
I made a PR #1129 that seems to make this config option do something.
@Burgestrand note this applies to sshkit config, not ssh. Definitely confusing that it doesn't apply elsewhere - probably should have made this an sshkit-specific config and plumbed it through.
@Burgestrand note this applies to
sshkitconfig, notssh. Definitely confusing that it doesn't apply elsewhere - probably should have made this an sshkit-specific config and plumbed it through.
@jeremy I don't understand, but I'd like to.
This change was made to lib/kamal/configuration/docs/ssh.yml, which is specifically ssh.
sshkit has its own configuration file in lib/kamal/configuration/docs/sshkit.yml, which doesn't mention anything about this option.
Yep, it's confusing for sure.
SSHKit is configured with config.ssh.options here: https://github.com/basecamp/kamal/blob/74a06b0ccda616c86ebe1729d0795f39bcac9f00/lib/kamal/commander.rb#L167
From there can trace along with https://github.com/basecamp/kamal/pull/908#issuecomment-2387652198
Hmm, indeed! That is the limited/curated set of options. I'll take a closer look at how I was getting the raw config through to SSHKit in my testing.