Libssh2 session method pref

From Libssh2

int libssh2_session_method_pref(LIBSSH2_SESSION *session, int method_type, const char *prefs);

About

Set preferred methods to be negotiated. These preferrences must be set prior to calling libssh2_session_startup() as they are used during the protocol initiation phase.

Parameters

  • session
    Session instance as returned by libssh2_session_init().
  • 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.

Returns

  • On Success: 0
  • On Failure: -1