ssh key order

ssh-copy-id on macOS ignores ~/.ssh/config for the source key (this is intentional and has always been the case). It picks the key like this:

  1. If you run ssh-copy-id -i /some/key, it uses that.
  2. Otherwise it uses this fixed order: id_rsa.pub → id_ecdsa.pub → id_ed25519.pub → most recently modified.pubfile in ~/.ssh/

Two ways to force ssh-copy-id to use id_ed25519 forever

Option 1 – just tell it explicitly every time (simplest)

Bash

ssh-copy-id -i ~/.ssh/id_ed25519 jayne.local

Option 2 – make it the default for ssh-copy-id too (one-time fix)

Bash

touch ~/.ssh/id_ed25519.pub *# update its timestamp to now*

ansible_ssh_common_args: '-p 22 -J pci200mon.oit.ncsu.edu:"'