Expansion for user keyword in ssh_config
Brian Candler
b.candler at pobox.com
Mon Sep 7 02:09:22 AEST 2026
On 06/09/2026 14:26, list at moeller-mail.eu wrote:
> I am trying to setup rules in the ssh_config , ~/.ssh/config file to automate some logins. The case I have would require
> the User keyword to include %n .
> e.g.
>
> Host *.domain.com.
> User me#%n
> Hostname gw.domain.com
>
>
> It seems to work on the latest clients except on Windows.
Can you describe in exactly what way does it "not work"? What username
is actually presented? What do you get from: ssh -G womble.domain.com |
grep ^user
I wonder if the # is being treated as a comment delimiter in Windows for
some reason. You could try quoting it, i.e.
User "me#%n"
More information about the openssh-unix-dev
mailing list