Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to specify and load multiple config files (ssh_config_path) #1937

Open
woky opened this issue Jan 26, 2019 · 2 comments
Open

Ability to specify and load multiple config files (ssh_config_path) #1937

woky opened this issue Jan 26, 2019 · 2 comments

Comments

@woky
Copy link

woky commented Jan 26, 2019

Since Paramiko currently doesn't support Include (and Match) ssh_config directives, it's not possible to use SSH configuration that's split across two or more files. In my setup I have common settings in ~/.ssh/config and site-specific settings in ~/.ssh/site/config which are included from the former file via Include directive with glob. So it's not enough to just point Fabric to the latter file. I need to construct SSHConfigs from opened files and pass ssh_config to Config.

There are two PRs that tries implement support for Include/Match but they seem to be stuck for months. It'd be useful in the meantime and very well for other use cases to have the ability to specify list of configuration files to be parsed via ssh_config_path in addition to single string entry and explicitSSHConfig.

I can poke the code and see what I can do. I'd probably start by ditching self._user_ssh_path and self._system_ssh_path in favor of list of config file paths. Does it sound OK?

@ploxiln
Copy link

ploxiln commented Jan 26, 2019

I don't think it's more likely to get this feature added to fabric than it is to get Include support merged into paramiko.

@mrmeszaros
Copy link

There is an open pull request with an implementation for handling Include: paramiko/paramiko#2307

That could resolve #2215 and likely fix this one - if still relevant for @woky

However, I just tested the PR with fabric, and it breaks, since fabric relies upon the internally used SSHConfig._config field.

This should first fixed - to only rely upon the public API of paramiko.SSHConfig.

I will try to create fix as soon as I can find the time for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants