MacOS Sonoma 14.5 -- SSH keeps asking for passwords even after providing an identity file
I upgraded from a 2016 iMac with an Intel chip running MacOS Monterey to a 2023 Mac Studio with an M2 Ultra chip running MacOS Sonoma.
The behavior of SSH has changed. SSH keeps asking for passwords even after I provided an identity file.
My ~/.ssh/config contains:
Host *
UseKeychain yes
AddKeysToAgent yes
IdentityFile ~/.ssh/id_dsa
I've used this command in Terminal:
ssh-add --apple-use-keychain ~/.ssh/id_dsa
I added this to my ~/.bashrc:
ssh-add --apple-load-keychain -q
I even tried this command in Terminal:
ssh -i ~/.ssh/id_dsa me@myurl.com
But I have to provide passwords.
When I run these commands in Terminal:
ssh-add -l
ssh-add -L
I get this message: "The agent has no identities."
When I runn this command:
ssh-add -T ~/.ssh/id_dsa
I get this message: "Couldn't read public key /Users/neal/.ssh/id_dsa: No such file or directory"
The directory ~/.ssh has permissions set to 700 (rwx------). The identity file, or private key, has its permissions set to 600 (rw-------).
Help! What is happening? Why does SSH behave this way?
Mac Studio, macOS 14.5