curl/docs/cmdline-opts/insecure.md
Yedaya Katsman 62bfcb0c44
help: add flags to output and ssh categories
- Add --output, --remove-on-error, --output-dir and --created-dirs to
  the output help category

- Add --hostpubmd5, --hostpubsha256, --insecure (-k), and --pubkey to
  the ssh help category

Closes #14076
2024-07-04 09:58:23 +02:00

1.4 KiB

c SPDX-License-Identifier Long Short Help Protocols Category Added Multi See-also Example
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. curl insecure k Allow insecure server connections TLS SFTP SCP tls sftp scp ssh 7.10 boolean
proxy-insecure
cacert
capath
--insecure $URL

--insecure

By default, every secure connection curl makes is verified to be secure before the transfer takes place. This option makes curl skip the verification step and proceed without checking.

When this option is not used for protocols using TLS, curl verifies the server's TLS certificate before it continues: that the certificate contains the right name which matches the hostname used in the URL and that the certificate has been signed by a CA certificate present in the cert store. See this online resource for further details: https://curl.se/docs/sslcerts.html

For SFTP and SCP, this option makes curl skip the known_hosts verification. known_hosts is a file normally stored in the user's home directory in the ".ssh" subdirectory, which contains hostnames and their public keys.

WARNING: using this option makes the transfer insecure.

When curl uses secure protocols it trusts responses and allows for example HSTS and Alt-Svc information to be stored and used subsequently. Using --insecure can make curl trust and use such information from malicious servers.