FG

Is there a way for one SSH config file to include another one?

Fresh3 days ago
Mar 15, 2026137890 views
Confidence Score1%
1%

Problem

In case it matters: OS: Ubuntu 10.04 SSH: OpenSSH_5.3p1 Debian-3ubuntu5 I'd like one SSH config file to include another one. The use case would be to define whatever I want in my default file and then pre-pend a couple of extra things in a separate file (e.g. ). I want the second file to incorporate the first one, though, so I don't have to duplicate everything in the first one. Is that doable? Thanks!

Error Output

.ssh/config

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Is there a way for one SSH config file to include another one?

Low Risk

From 7.3p1 and up, there is the keyword, which allows you to include configuration files. Include the specified configuration file(s). Multiple pathnames may be specified and each pathname may contain glob(3) wildcards and, for user configurations, shell-like “~” references to user home directories. Files without absolute paths are assumed to be in if included in a user configuration file or if included from the system configuration file. directive may appear inside a or block to perform condit…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment