[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

auth_pubkry callback is only getting called with signature_state == SSH_PUBLICKEY_STATE_NONE


…
int auth_publickey(ssh_session session, const char *user,
                                        struct ssh_key_struct *pubkey,
                                        char signature_state,
                                        void *userdata)
{
	struct AUTH_DATA *auth_data = (struct AUTH_DATA*) userdata;
	DBGINFO("%s Authenticating user ->%s<-\n", __func__, user);

	if (signature_state == SSH_PUBLICKEY_STATE_NONE){
		DBGINFO("Partial auth \n");
		return SSH_AUTH_PARTIAL;
	}

	if (signature_state != SSH_PUBLICKEY_STATE_VALID){
		DBGINFO("PUBLIC KEY INVALID\n");
		return SSH_AUTH_DENIED;
	}
…..


I’ve tried calling my ssh server with the linux ssh app and also an libssh app using ssh_userauth_publickey_auto() and I get multiple calls to my auth_publickey() function but signature_state is always SSH_PUBLICKEY_STATE_NONE.  I’ve read that SSH_AUTH_PARTIAL is the appropriate response but I never get a call with another state.  Any hints at what I may be doing wrong?

Thanks,
-Eric

Archive administrator: postmaster@lists.cynapses.org