From c160a3bc0c7983574c7ee1691fac2ec07e0af8c6 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Fri, 13 Jan 2023 22:30:39 +0100 Subject: [PATCH] Synced to the example in Dotfiles --- examples/ssh.config | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/examples/ssh.config b/examples/ssh.config index 2786b76..07522dc 100644 --- a/examples/ssh.config +++ b/examples/ssh.config @@ -4,8 +4,8 @@ ## Gotchas: ## - priority goes from top to bottom ## - defaults MUST come last -## - canonicalization as a default MUST be on top as it forces a config reload -## for canonicalized hosts +## - canonicalization as a default MUST be on top to force a config reload +## when checking hosts matching it ## - host specificity is NOT a factor of priority ## - host sections can be specified multiple times ## - multiple hostnames (and aliases) may be specified per section @@ -13,9 +13,9 @@ ################################################################################ # Canonicalize host names before connecting -# On top, as it forces a config reload for canonicalized hosts +# On top, so it forces a config reload for canonical hosts CanonicalizeHostname yes -CanonicalDomains lan my.org +CanonicalDomains lan local my.org # Legacy hosts' specific settings # E.g. old key algorithms @@ -29,6 +29,7 @@ Host legacy # E.g. no key checking due to them being ephemeral Host local vm* Hostname localhost + IdentitiesOnly yes IdentityFile ~/.ssh/id_rsa StrictHostKeyChecking no UserKnownHostsFile /dev/null @@ -47,16 +48,17 @@ Host omnia turris IdentitiesOnly yes User root Host pi* raspberrypi* - AddKeysToAgent no - SendEnv -PAGER LC_* - SetEnv FOO=bar - StrictHostKeyChecking no - UseKeyChain no - User pi + AddKeysToAgent no + SendEnv -LC_* PAGER + SetEnv FOO=bar + UseKeyChain no + User pi # User-specific settings -Match user root +Match user robots IdentityFile ~/.ssh/id_ed25519 + ServerAliveInterval 300 + ServerAliveCountMax 2 # Default settings start here