Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it possible to have multiple tags on a configuration block. #549

Open
wants to merge 1 commit into
base: V_9_9
Choose a base branch
from

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