I am writing a client program that allows the user to log in to a server. The program expects that the user has already set up an ssh agent and added their RSA keypair to it. It grabs the public key and sends it to a remote signer, which returns an SSH certificate for the public key. This certificate declares that the owner of the public key is permitted to log in to the server.
I want to make the client program add the certificate to the agent and associate it with the key, so that it can ssh to the remote server using the key with the certificate. How can I do this?
~/.ssh/authorized_keys
? This sounds a bit like Keybase (though Keybase only wants to support provable items, and a client key can't be proven on demand). Otherwise, perhaps check outssh-copy-id
or just runcat ~/.ssh/id_rsa.pub |ssh user@remote-host "cat >>.ssh/authorized_keys"
and enter your password one final time. – Priscian