A Linux administrator is trying to download a configuration file from a new internal development server using curl. The command fails with the following error:
The administrator needs to quickly test access to the file and is not concerned with certificate validation for this specific, one-time task. Which of the following commands should the administrator use to bypass the certificate check and download the file?
update-ca-certificates
certutil -A -n "dev-server" -t "P,," -d sql:$HOME/.pki/nssdb -i dev-server.crt
The correct command is curl -k https://dev-server/config.txt. The -k or --insecure option for curl explicitly allows connections to SSL sites without verifying the certificate. This is suitable for a trusted internal development environment where a self-signed certificate is common and the immediate goal is to access a file, not to establish a permanent, secure connection.
openssl s_client -connect dev-server:443 -showcerts is a diagnostic tool used to connect to an SSL/TLS server and display its certificate chain; it does not download the file itself.
update-ca-certificates is a command used on Debian-based systems to update the system's trusted CA certificate store. While this is part of the proper long-term solution (adding the self-signed certificate's CA to the trust store), it is more complex than needed for a quick, one-time test and requires root privileges.
certutil -A -n "dev-server" -t "P,," -d sql:$HOME/.pki/nssdb -i dev-server.crt is a command for adding a certificate to the NSS database, which is used by applications like Firefox. It is not the most direct method for making curl trust a certificate for a single execution and is more complex than necessary for the described task.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What does the '-k' option in curl do?
Open an interactive chat with Bash
Why are self-signed certificates common in internal environments?
Open an interactive chat with Bash
How does 'openssl s_client' differ from 'curl' in this context?
Open an interactive chat with Bash
CompTIA Linux+ XK0-006 (V8)
Troubleshooting
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
IT & Cybersecurity Package Join Premium for Full Access