2 ms·
I highly recommend using the canonicalization feature if you use multiple networks: CanonicalizeHostname yes CanonicalDomains example.org That ensures
by acdha 7y ago
I highly recommend using the canonicalization feature if you use multiple networks:
CanonicalizeHostname yes
CanonicalDomains example.org
That ensures that you never have the same host listed twice under the bare hostname and the fully-qualified version, avoiding the need to change keys twice when you rotate them.
This setting allows you to automatically accept keys for new hosts but still report conflicts for existing hosts:
StrictHostKeyChecking accept-new
I highly recommend using the control-master feature to keep a persistent connection open to servers you access a lot. This makes new connections and tools like Git, scp, sftp, rsync, etc. much faster:
Host *.amazonaws.com github.com *.github.com gitlab.com *.gitlab.com *.googleusercontent.com
ControlMaster auto
ControlPath ~/.ssh/control/%C.socket
ControlPersist 600
On MacOS, you can use an x509 certificate on a device like a Yubikey as the SSH key so you can authenticate everywhere with the private key never leaving the token and, should you set it up that way, requiring a tap to use.
This will enable the provider:
PKCS11Provider=/usr/lib/ssh-keychain.dylib
This will get the public key:
ssh-keygen -D /usr/lib/ssh-keychain.dylib
(see https://piv.idmanagement.gov/engineering/ssh/ https://piv.idmanagement.gov/engineering/ssh/ for other platforms)