Skip to content

Conversation

@kurganme
Copy link

@kurganme kurganme commented Jan 4, 2025

This patch allows for multiple tags on a configuration block.
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

the following parameters can be obtained:

gandalf@mybox $ ssh -P nocheck -P frodo-identity test-host -G |
> grep -E "^(user|hostname|port|stricthostkeychecking|identityfile|`
>         `userknownhostsfile|tag|proxyjump) "
user bilbo
hostname new-hostname
port 12345
stricthostkeychecking false
identityfile ~/.ssh/id_ed25519_frodo
userknownhostsfile /dev/null
tag nocheck
tag frodo-identity
tag change-hostname
tag change-port-and-user
tag jump-to-mybox
tag change-user
proxyjump mybox
gandalf@mybox $

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant