ssh_config
ssh_config copied to clipboard
Go parser for ssh_config files
Currently, UserSettings.loadConfig has a type of sync.Once so the config files only need to be reloaded once. This can be inconvenient if the files need to be re-parsed for updated...
e.g., `Include ~/other/config` on Linux, `Include ~\other\config` on Windows.
There is an open question i could not get my head around. As far as i undertood the test `TestIncludeSystem` it should by possible to imoprt a file `/etc/ssh/kevinburke-ssh-config-test-file` by...
I recently noticed that `ssh_config.Get()` function does not remove leading and trailing double quotes from string. Eventually it leads to strange error: ``` open "/Users/furkan/bar/_config/user": no such file or directory...
Currently we have to manually decode the configuration file: ```golang f, _ := os.Open(filepath.Join(os.Getenv("HOME"), ".ssh", "config")) cfg, _ := ssh_config.Decode(f) // cfg.Hosts ``` It'd be nice to have a function...
It seems every value needs to be queried separately. It would be great to have something like: ```go host, _ := ssh_config.GetHost("foo") fmt.Println(host.IdentityFile) fmt.Println(host.StrictHostKeyChecking) host.Port = 45 fmt.Println(host.SSHConfig()) ```
I can't do something like this: ```go type sshconfig interface { GetAll(alias, key string) ([]string, error) } var sshConfig sshconfig func initSshConfig() { if path := os.Getenv("SSH_CONFIG"); path != ""...
This PR tries to make https://github.com/kevinburke/ssh_config/issues/6 less of an issue. [The `go-git-v5` lib uses your nice ssh parser](https://github.com/go-git/go-git/blob/master/plumbing/transport/ssh/common.go#L228) however in Alma 8/9 and most of RHEL there is this `Match`...