1libssh2_session_method_pref(3)      libssh2     libssh2_session_method_pref(3)
2
3
4

NAME

6       libssh2_session_method_pref - set preferred key exchange method
7

SYNOPSIS

9       #include <libssh2.h>
10
11       int
12       libssh2_session_method_pref(LIBSSH2_SESSION *session,
13                                   int method_type, const char *prefs);
14

DESCRIPTION

16       session - Session instance as returned by libssh2_session_init_ex(3)
17
18       method_type - One of the Method Type constants.
19
20       prefs  -  Coma delimited list of preferred methods to use with the most
21       preferred listed first and the  least  preferred  listed  last.   If  a
22       method  is  listed which is not supported by libssh2 it will be ignored
23       and not sent to the remote host during protocol negotiation.
24
25       Set preferred methods to be negotiated. These preferences must  be  set
26       prior  to  calling libssh2_session_handshake(3) as they are used during
27       the protocol initiation phase.
28

RETURN VALUE

30       Return 0 on success or negative on  failure.   It  returns  LIBSSH2_ER‐
31       ROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is
32       a negative number, it is not really a failure per se.
33

ERRORS

35       LIBSSH2_ERROR_INVAL - The requested method type was invalid.
36
37       LIBSSH2_ERROR_ALLOC -  An internal memory allocation call failed.
38
39       LIBSSH2_ERROR_METHOD_NOT_SUPPORTED - The requested method is  not  sup‐
40       ported.
41

SEE ALSO

43       libssh2_session_init_ex(3) libssh2_session_handshake(3)
44
45
46
47libssh2 0.15                      1 Jun 2007    libssh2_session_method_pref(3)
Impressum