Matching the local domain

Ronan Pigott ronan at rjp.ie
Thu Jun 1 13:40:56 AEST 2023


Hey ssh users,

I'd really like a method to match my local host domain in my ssh config. Basically if I travel with
my laptop I get a domain from dhcp and want to match a Host section based on this domain like
*.localdomain. It doesn't seem like this is currently possible? I tried adding a new %D percent
token to ssh but Host doesn't accept such tokens, only patterns, so that's a bust.

Is this currently possible with openssh? If not, any good ideas for what the config syntax should
be?

Cheers,
Ronan


More information about the openssh-unix-dev mailing list