In my ~/.ssh/config
I added the following:
Include /Path/to/ssh.config
And it gives error:
ssh remoteEc-2
/Users/Me/.ssh/config: line 1: Bad configuration option: include
/Users/Me/.ssh/config: terminating, 1 bad configuration options
ssh -V
gives:
OpenSSH_6.9p1, LibreSSL 2.1.8
I am on OSX El-Capitan
sshd_config is the configuration file for the OpenSSH server. ssh_config is the configuration file for the OpenSSH client.
The ssh program on a host receives its configuration from either the command line or from configuration files ~/. ssh/config and /etc/ssh/ssh_config .
AddKeysToAgent. Specifies whether keys should be automatically added to a running ssh-agent(1). If this option is set to yes and a key is loaded from a file, the key and its passphrase are added to the agent with the default lifetime, as if by ssh-add(1).
Include
is not a valid option until version 7.3...
See: https://www.openssh.com/txt/release-7.3
New Features
[...]
- ssh(1): Add an Include directive for ssh_config(5) files.
Also, see this answer.
If you can't / don't want to update, then you could collate your configuration files, using the following:
cat ${CONFIG_1} ${CONFIG_2} ${CONFIG_3} > ~/.ssh/config
You'd need to run it every time you update any of the parts...
Same problem, except I'm on 7.4
Turns out, the Include
directive needs to go into /etc/ssh/ssh_config, not /etc/ssh/sshd_config
(note the d
in the filename).
Wasn't obvious to me. Hope this saves whoever finds this some time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With