1CURLOPT_SSH_AUTH_TYPES(3)  curl_easy_setopt options  CURLOPT_SSH_AUTH_TYPES(3)
2
3
4

NAME

6       CURLOPT_SSH_AUTH_TYPES - auth types for SFTP and SCP
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_AUTH_TYPES, long bitmask);
12

DESCRIPTION

14       Pass   a   long  set  to  a  bitmask  consisting  of  one  or  more  of
15       CURLSSH_AUTH_PUBLICKEY,    CURLSSH_AUTH_PASSWORD,    CURLSSH_AUTH_HOST,
16       CURLSSH_AUTH_KEYBOARD and CURLSSH_AUTH_AGENT.
17
18       Set  CURLSSH_AUTH_ANY  to  let  libcurl  pick a suitable one. Currently
19       CURLSSH_AUTH_HOST has no effect. If CURLSSH_AUTH_AGENT is used, libcurl
20       attempts  to  connect to ssh-agent or pageant and let the agent attempt
21       the authentication.
22

DEFAULT

24       CURLSSH_AUTH_ANY (all availables ones)
25

PROTOCOLS

27       SFTP and SCP
28

EXAMPLE

30       CURL *curl = curl_easy_init();
31       if(curl) {
32         curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/file");
33         curl_easy_setopt(curl, CURLOPT_SSH_AUTH_TYPES,
34                          CURLSSH_AUTH_PUBLICKEY | CURLSSH_AUTH_KEYBOARD);
35         ret = curl_easy_perform(curl);
36         curl_easy_cleanup(curl);
37       }
38

AVAILABILITY

40       CURLSSH_AUTH_HOST was added in 7.16.1, CURLSSH_AUTH_AGENT was added  in
41       7.28.0
42

RETURN VALUE

44       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
45       if not.
46

SEE ALSO

48       CURLOPT_SSH_HOST_PUBLIC_KEY_MD5(3), CURLOPT_SSH_PUBLIC_KEYFILE(3),
49
50
51
52libcurl 7.85.0                   May 17, 2022        CURLOPT_SSH_AUTH_TYPES(3)
Impressum