This happened to me once when, after a fresh install of Fedora, I restored my private key from backup but not my public key – I didn’t have a backup of my public key. Although I could authenticate to servers using my key, I was puzzled why I was being prompted again and again for the key’s passphrase.
It finally occurred to me that maybe it was because I didn’t have my public key present. I generated the public key from the private key using the following command:
cd ~/.ssh
ssh-keygen -y -f id_rsa >id_rsa.pub
Options used:
-y
This option will read a private OpenSSH format file and print an
OpenSSH public key to stdout.
-f filename
Specifies the filename of the key file.
It worked. The next time I attempted to use my ssh key, a GUI dialog popped up prompting me to enter the passphrase to unlock the key. It had a checkbox for automatically unlocking the key whenever I log in.
I also could see the key in seahorse
, a.k.a. “Passwords and Keys.” This is not installed by default in Fedora Workstation. To install it…
# Install the "Passwords and Keys" application
sudo dnf install seahorse