-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ssh): resolve relative ssh_config Include correctly
As per ssh_config man, "Files without absolute paths are assumed to be in ~/.ssh if included in a user configuration file or /etc/ssh if included from the system configuration file." So relative include base stays the same throughout recursion, even if the system-wide config is included from user's config. This commit also optimizes traversing ssh config includes. Previously each config file was read with separate `sed` command to extract `Include` directives. This can get quite slow if there are a lot of included files. Instead of reading each individual file, we can put all the files at a current recursion level into a single sed invocation and extract all the directives in one go.
- Loading branch information
Showing
1 changed file
with
36 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters