I've been searching around with no luck, so I'm just asking to make sure.

Is it possible to import an external config file? Example with ~/.ss/config file :

Hosts * 
  IdentityFile ~/.ssh/id_rsa_servicekey

Include ~/.sshconfig.local

There is no such include feature documented (and presumably a similar case for portable OpenSSH). Since OpenSSH has had issues with undocumented parameters (the recent UseRoaming thing), a quick peek around the source tree, in particular the readconf.c file, does not show anything obvious for includes. So, you'll probably have to find some other way to effect an include (e.g. cd ~/.ssh && cat fooconf localconf > config or as complicated as you want to make it).


It is not possible in current upstrem openssh version. But I worked on the patch that would provide this functionality for both client and server.

It is currently available for Fedora from copr repository. The patches are tracked in upstream bugzilla as bugs #1585 and #2468 and I would be glad for some feedback and testing.

Update: The bug #1585 was updated but openssh developer, so we can expect some progress in the close future.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.