What version is your MDS? I just tested a similar command on one of mine running R81.10 jumbo 94, and it worked:
[<myUser>@<client> ~]$ curl -kvH "Content-Type: application/json" -d '{"user":"<myUser>","password":"<myPassword>","read-only":true}' https://<MDS>/web_api/login
...
< HTTP/1.1 200 OK
< Date: Thu, 26 Oct 2023 14:16:15 GMT
< Server: Jetty(9.2.9.v20150224)
< Strict-Transport-Security: max-age=31536000; includeSubDomains
< X-Frame-Options: SAMEORIGIN
< Content-Type: application/json
< X-UA-Compatible: IE=EmulateIE8
< X-Forwarded-Host-Port: 443
< Transfer-Encoding: chunked
<
{
"sid" : "...",
"url" : "https://<MDS>:443/web_api",
"session-timeout" : 600,
"login-message" : {...},
"read-only" : true,
"api-server-version" : "1.8.1",
"user-name" : "<myUser>",
"user-uid" : "..."
}
Multiple '-v' switches don't make cURL more verbose. The '-X POST' is implied by having the -d. I added read-only: true because my MDS is live, and I don't want to leave anything in the client shell logs which could be used to make changes. I think those are the only changes I made to the cURL command.
Maybe some service is misbehaving. Have you tried 'mdsstop && mdsstart' or rebooting?