ssh_agent_has_key
int ssh_agent_has_key(int sock, const struct sshkey *key);
if ((r = ssh_agent_has_key(agent_fd, pubkey)) == 0)