Expansion for user keyword in ssh_config

list at moeller-mail.eu list at moeller-mail.eu
Mon Sep 7 03:37:41 AEST 2026


Thank you
Markus

-----Original Message----- 
From: Brian Candler
Sent: Sunday, September 6, 2026 6:09 PM
To: openssh-unix-dev at mindrot.org
Subject: Re: Expansion for user keyword in ssh_config

On 06/09/2026 17:56, list at moeller-mail.eu wrote:
> On an older Linux I get
>
> ssh -G 192.168.1.2
> host 192.168.1.2
> user piAAA%n

Thank you for the clear platform comparison, with all the version
numbers included. That makes it fairly certain that the feature was
introduced in OpenSSH >9.5 <=10.0

The release notes are pretty easy to find:
https://www.openssh.org/releasenotes.html

Scanning through this, the release notes for OpenSSH 10.0/10.0p2
(2025-04-09) say:

  *ssh(1) <https://man.openbsd.org/ssh.1>: allow %-token and environment 
variable expansion in
    the ssh_config User directive, with the exception of %r and %C
    which would be self-referential.bz#3477 
<https://bugzilla.mindrot.org/show_bug.cgi?id=3477>

Therefore the answer is: upgrade to 10.0 or later if you want this feature.
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev at mindrot.org
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev 



More information about the openssh-unix-dev mailing list