December 9, 2019

How to Ignore Invalid and Self Signed SSL Connection Errors With cURL and Wget

If you use the curl or wget command and don’t want SSL to be checked so that the process should occur, you can use options or add commands.

-) cURL

$ curl -k url
$ curl --insecure url
$ curl --insecure -I url

Example:

$ curl -k https://sibunglon.com/image.png

-) Wget

$ wget --no-check-certificate url

Example:

$ wget --no-check-certificate https://sibunglon.com/image.png

But if you don’t want to use this additional option, just create a file whose contents can pass the SSL Certificate check. To create a file you can use the following command:

-) cURL

$ echo "insecure" >> $HOME/.curlrc

-) Wget

$ echo "check_certificate = off" >> $HOME/.wgetrc