sshconfig-lint / guide
Find and break SSH Include cycles
← All SSH config guidesTrace circular OpenSSH Include chains and move shared defaults into a one-way structure.
Why a valid config can still be wrong
A config can include a second file that eventually includes the first one again. The chain is difficult to inspect manually once globs and nested directories are involved.
A reliable way to fix it
- Start at the file and line reported as INCLUDE_CYCLE.
- Follow the Include chain until it returns to an already visited file.
- Remove that back-reference or move shared values into a third file included in one direction.
# config
Include conf.d/work
# conf.d/work
Include ../config# config
Include conf.d/work
# conf.d/work
Include common.conf