On 07/01/2025 16:48, kurgan kurganme wrote:
I wrote this small patch that allows having multiple tags on a
configuration block in the openssh client configuration.
For instance, with this configuration:
Host test-host
Tag change-hostname change-port-and-user
Tag jump-to-mybox
Match tagged change-hostname
Hostname new-hostname
Match tagged change-port-and-user
Port 12345
Tag change-user
Match tagged change-user
User bilbo
Match tagged jump-to-mybox
ProxyJump mybox
Match tagged nocheck
StrictHostKeyChecking false
UserKnownHostsFile /dev/null
Match tagged frodo-identity
IdentityFile ~/.ssh/id_ed25519_frodo
Could this not be done using the "Include" directive? ssh_config(5) says:
"Files without absolute paths are assumed to be in ~/.ssh if included in
a user configuration file [...] Include directive may appear inside a
Match or Host block to perform conditional inclusion."
which suggests:
Host test-host
Include change_hostname.conf
Include change_port_and_user.conf
Include jump_to_mybox.conf
...
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev