1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Long: key 5Arg: <key> 6Protocols: TLS SSH 7Help: Private key filename 8Category: tls ssh 9Added: 7.9.3 10Multi: single 11See-also: 12 - key-type 13 - cert 14Example: 15 - --cert certificate --key here $URL 16--- 17 18# `--key` 19 20Private key filename. Allows you to provide your private key in this separate 21file. For SSH, if not specified, curl tries the following candidates in order: 22`~/.ssh/id_rsa`, `~/.ssh/id_dsa`, `./id_rsa`, `./id_dsa`. 23 24If curl is built against OpenSSL library, and the engine pkcs11 or pkcs11 25provider is available, then a PKCS#11 URI (RFC 7512) can be used to specify a 26private key located in a PKCS#11 device. A string beginning with `pkcs11:` is 27interpreted as a PKCS#11 URI. If a PKCS#11 URI is provided, then the --engine 28option is set as `pkcs11` if none was provided and the --key-type option is 29set as `ENG` or `PROV` if none was provided (depending on OpenSSL version). 30 31If curl is built against Secure Transport or Schannel then this option is 32ignored for TLS protocols (HTTPS, etc). Those backends expect the private key 33to be already present in the keychain or PKCS#12 file containing the 34certificate. 35