From 24548f4800c7f09528e54d10e994be65fa851e70 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Wed, 13 Nov 2024 22:56:19 +0100 Subject: [PATCH] feat(ssh/config): match host *and* user --- examples/ssh/ssh_config | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/examples/ssh/ssh_config b/examples/ssh/ssh_config index a743b4d..dea8b00 100644 --- a/examples/ssh/ssh_config +++ b/examples/ssh/ssh_config @@ -59,13 +59,16 @@ Host legacy-hosts azure-vm-* oci-bastion-* # Avoid nuisances with ephemeral hosts and localhost # E.g. preemptible or testing virtual machines which are often recreated -Host localhost *-vm-* +Host localhost *-vm-* *.compute.internal StrictHostKeyChecking no UserKnownHostsFile /dev/null # User-specific settings # E.g. programmatic accesses -Match user robots +Match Host *.compute.internal User ansible + IdentitiesOnly yes + IdentityFile ~/.ssh/ansible.key +Match User robots AddKeysToAgent no BatchMode yes ForwardAgent no