sshconfig-lint / guide

Find and break SSH Include cycles

All SSH config guides

Trace 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

  1. Start at the file and line reported as INCLUDE_CYCLE.
  2. Follow the Include chain until it returns to an already visited file.
  3. Remove that back-reference or move shared values into a third file included in one direction.
Problem
# config
Include conf.d/work

# conf.d/work
Include ../config
Corrected
# config
Include conf.d/work

# conf.d/work
Include common.conf