Curl does not use different credentials on this:
curl -n ftp://foouser@example.com
curl -n ftp://baruser@example.com
Almost all clients (wget, lftp, ftp, ...) pick the matching entry out of ~/.netrc,
but curl just takes the first ~/.netrc entry for "example.com".
Or, as a standalone example, using http:
cat > curl.netrc <<EOF
machine example.com
login foouser
password foouser
machine example.com
login baruser
password baruser
EOF
#> curl -qsS --netrc-file curl.netrc --trace-ascii - http://baruser@example.com | grep "user"
== Info: Server auth using Basic with user 'foouser'
#> curl -qsS --netrc-file curl.netrc --trace-ascii - http://foouser@example.com | grep "user"
== Info: Server auth using Basic with user 'foouser'
curl/libcurl version
curl 7.79.1
Curl does not use different credentials on this:
Almost all clients (wget, lftp, ftp, ...) pick the matching entry out of ~/.netrc,
but curl just takes the first ~/.netrc entry for "example.com".
Or, as a standalone example, using http:
curl/libcurl version
curl 7.79.1