Variable substitution in UserKnownHostsFile configuration option

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Jan 16 11:46:44 AEDT 2015


On Sat 2015-01-10 09:10:38 -0500, Dmitry Katsubo wrote:

> Do you find it a good idea if variable substitution is implemented in
> UserKnownHostsFile the same way it is done for IdentityFile? In
> ssh_config I would like to write something like
>
> UserKnownHostsFile ~/keys/%r/known_hosts

%r is the remote username, right?  so this would be useful if you wanted
a different known_hosts file for example.net depending on whether you
were logging in as foo at example.net or bar at example.net.  is that right?
if so, it seems like a pretty strange use case.  can you come up with a
better rationale for the variable substitution?

In the abstract, it seems like a reasonable suggestion, but the specific
example you're offering isn't particularly compelling.

        --dkg


More information about the openssh-unix-dev mailing list