int libssh2_session_method_pref(LIBSSH2_SESSION *session, int method_type, const char *prefs);
method_type - One of the Method Type constants.
prefs - Coma delimited list of preferred methods to use with the most preferred listed first and the least preferred listed last. If a method is listed which is not supported by libssh2 it will be ignored and not sent to the remote host during protocol negotiation.
Set preferred methods to be negotiated. These preferences must be set prior to calling libssh2_session_handshake(3) as they are used during the protocol initiation phase.
LIBSSH2_ERROR_ALLOC - An internal memory allocation call failed.
LIBSSH2_ERROR_METHOD_NOT_SUPPORTED - The requested method is not supported.