ParallelSSH / parallel-ssh

Asynchronous parallel SSH client library.
https://parallel-ssh.org
GNU Lesser General Public License v2.1
1.2k stars 149 forks source link

Read and respect ~/.ssh/config #335

Closed vince-weka closed 2 years ago

vince-weka commented 2 years ago

Is your feature request related to a problem? Please describe. I'm using a ~/.ssh/config file to set what keys go to which hosts, and such. parallel-ssh does not read or process the config file, like the ssh command does.

Describe the solution you'd like Read/parse, and automatically use settings in the config file when creating the SSHClient and ParallelSSHClient objects, unless specific things are overridden via arguments.

Describe alternatives you've considered None, really. I'd like to move away from paramiko, and this is a bit of a blocker. I'll either have to stick with paramiko, or steal (ahem, borrow?) their code for parsing the config file and use that in my program... Maybe the same can be done here?

Additional context None

pkittenis commented 2 years ago

Hi there,

Thanks for the interest. There is already an issue for doing this - #103 . PRs welcome.

Per that issue, it shouldn't be automatic but it should produce corresponding HostConfig entries from that config file. Libraries should not automatically use external config files from another application, that's a bad design.