Skip to content

Commit 5d2b0fa

Browse files
committed
CURLOPT_SSH_*_KEYFILE: clarify
Closes curl#12554
1 parent 98794c5 commit 5d2b0fa

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

docs/libcurl/opts/CURLOPT_SSH_PRIVATE_KEYFILE.3

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,17 @@ CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SSH_PRIVATE_KEYFILE,
3434
.SH DESCRIPTION
3535
Pass a char * pointing to a \fIfilename\fP for your private key. If not used,
3636
libcurl defaults to \fB$HOME/.ssh/id_rsa\fP or \fB$HOME/.ssh/id_dsa\fP if the
37-
HOME environment variable is set, and just \fB"id_rsa"\fP or \fB"id_dsa"\fP in
38-
the current directory if HOME is not set.
37+
HOME environment variable is set, and in the current directory if HOME is not
38+
set.
3939

4040
If the file is password-protected, set the password with
4141
\fICURLOPT_KEYPASSWD(3)\fP.
4242

43+
The SSH library derives the public key from this private key when possible. If
44+
the SSH library cannot derive the public key from the private one and no
45+
public one is provided with \fICURLOPT_SSH_PUBLIC_KEYFILE(3)\fP, the transfer
46+
fails.
47+
4348
The application does not have to keep the string around after setting this
4449
option.
4550
.SH DEFAULT

docs/libcurl/opts/CURLOPT_SSH_PUBLIC_KEYFILE.3

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ libcurl defaults to \fB$HOME/.ssh/id_dsa.pub\fP if the HOME environment
3737
variable is set, and just "id_dsa.pub" in the current directory if HOME is not
3838
set.
3939

40-
If NULL (or an empty string) is passed, libcurl passes no public key to
41-
libssh2, which then computes it from the private key. This is known to work
42-
with libssh2 1.4.0+ linked against OpenSSL.
40+
If NULL (or an empty string) is passed to this option, libcurl passes no
41+
public key to the SSH library, which then rather derives it from the private
42+
key. If the SSH library cannot derive the public key from the private one and
43+
no public one is provided, the transfer fails.
4344

4445
The application does not have to keep the string around after setting this
4546
option.

0 commit comments

Comments
 (0)