From 3ed371abb0af28e962f763c8c8a00ea90e39e864 Mon Sep 17 00:00:00 2001 From: Jacopo Nespolo Date: Fri, 21 Nov 2025 09:41:09 +0100 Subject: [PATCH] Skip directories within ~/.ssh/config.d close #784 Only parse files within the ~/.ssh/config.d directory, ignoring subdirectories. This conforms to the behaviour of ssh implementations that ignore `config.d` subdirs. --- asyncssh/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/asyncssh/config.py b/asyncssh/config.py index 0376b74..1705b11 100644 --- a/asyncssh/config.py +++ b/asyncssh/config.py @@ -146,7 +146,7 @@ def _include(self, option: str, args: List[str]) -> None: else: path = self._default_path - paths = list(path.glob(pattern)) + paths = list(p for p in path.glob(pattern) if p.is_file()) if not paths: logger.debug1(f'Config pattern "{pattern}" matched no files')