Celeb Glow
general | March 24, 2026

How to check that username password is correct using curl command?

I want to be able to write a curl command where in i pass options like username password in the curl itself and it should connect to the server. Is there a way where we can find if the user is able to connect to that mentioned server? That means it should throw some error while I run the curl, if the credentials are incorrect. I was trying the below :-

curl --silent -k --digest -u "admin:admin" ""

But this return nothing.

1

1 Answer

According to man curl the reason you're getting no response is --silent, as expected:

Silent or quiet mode. Don't show progress meter or error mes‐ sages. Makes Curl mute. It will still output the data you ask for, potentially even to the terminal/stdout unless you redirect it.

If you don't want the progress meter, the likely reason you chose to add --silent, but you want to see the error messages then you must use -S additionally.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy