It seems that the Cockpit is looking for a private key, and the public key needs to be transferred either using copy-id or sftp as advised by the Fedora docs.
Warming message below;
Not a valid private key.
Do I need to configure Open SSH files under section 4 of the Fedora docs - Disable System Users Password Login?
Hope that I’m not wrong: The public key should not be transferred to the remote .ssh folder, but the contents should be appended to ~/.ssh/authorized_hosts. That’s what ssh-copy-id does. Of course, you can sftp the public key to whatever location on the remote, as long it is not in ~/.ssh, and do the append or edit there.
Password login can be disabled on the remote host in the sshd config file, but be sure not to lock out yourself and check that public key login works before!!!