I followed some aws guide to add my private key to ssh-agent, using:
ssh-add -K "MyPrivateKey.pem"
However, I can't seem to remove the key using :
ssh-add -d "MyPrivateKey.pem"
which gives me the following error:
Bad key file MyPrivateKey.pem: No such file or directory
Unless I do ssh-add -D
which removes all of the private keys I stored (obviously not favorable option). I also find that macOS ssh key management is tightly bind with Keychain, but I haven't discovered any method to identify the specific ssh key from Keychain Access. I am running on Mojave 10.14.6
tl;dr How do I get ssh-add -d
to work on macOS?