cybrkyd

SSH config

 Mon, 03 Nov 2025 20:01 UTC

SSH config tends to drop out of my memory and I need a refresher from time to time. I’ve updated my cheat sheet and am making a note about ~/.ssh/config when using key files with non-standard names.

I name my keys to something useful, and eventually forget all about the issues this causes when attempting to connect to a remote server without having to enter the password each time. I’ve seen an issue many times with ssh insisting on a password even when /etc/ssh/sshd_config contains PasswordAuthentication no.

Because SSH auto-loads only standard names by default, it needs to be configured to also load the keys with weird names. Add the following to ~/.ssh/config to ensure that connections can be made without a password.

Host server
    HostName server.com
    User bob
    IdentityFile ~/.ssh/id_bobby
    IdentitiesOnly yes

Then connect by simply typing this:

ssh server
»
Tagged in: #CheatSheet #ssh

Visitors: Loading...