When you say "SSO provider", that can either be a "service provider", i.e. the SP, or an "identity provider", i.e. the IdP. Both of those can be either local or remote, and that in turn is orthogonal to wether you're hosting/managing either of them. You need to think about in terms of who's emitting or receiving a request:
-) A *local* SP, i.e. some site that's being protected with SSO, emits a sign on request to a *remote* IdP. You can be hosting/managing either of these two services yourself, like I do for testing purposes.
-) The *local* IdP that receives this sign on request views the SP as *remote*. Again, you can be hosting/managing either of these two services yourself, and that doesn't change who's the local or remote counterpart in this handshake.
So, when you load data into saml20-idp-remote.php, presumably what you're doing is configuring a *local* SP to use a *remote* IdP, and it's up to the manager of the latter to decide what user authentication source (i.e. the "authsource" in SimpleSAMLphp speak) that service uses, not up to the manager of the *local* SP; the local SP only needs to know what remote IdP to use.
But adding to the confusion, though, the *local* SP hooks into SimpleSAMLphp through an "authsource" of its own, which is what points it at the *remote* IdP to use through the 'idp' setting.
Does that help? Hopefully this depiction of how I organize my configurations will make it a little clearer:
-> ls authsources/
(...)
someLocalSPIdentifier.php --> this is what my application to be protected with SSO loads through SimpleSAML_Auth_Simple->requireAuth(), and it points at someRemoteIdPIdentifier.php through the 'idp' setting.
(...)
-> ls providers/identity/saml20-idp-remote/
(...)
someRemoteIdPIdentifier.php
(...)
And that's what's generated by the metadata sent by the *remote* IdP. Naturally, then, what's in that directory is what I feed into metadata/saml20-idp-remote.php. In turn, the metadata generated by someLocalSPIdentifier.php is what I send to the *remote* IdP (and how they decide to manage and organize that, it's not my concern).
But when it comes to hosting/managing my own *local* IdP, i.e. the one that's going to be receiving *remote* SPs metadata and providing IdP services to them, this is how I organize it:
-> ls providers/identity/saml20-idp-hosted/
myLocalIdPIdentifier.php --> this can use any number of "authsources" where to pull user credentials from, e.g. an LDAP-based authsource, e.g. devLDAPdb.php
-> ls authsources/
(...)
devLDAPdb.php --> how you configure this to actually talk to your LDAP server, that's a different question.
(...)
The metadata that's generated by that *local* IdP is what I send to the *remote* SPs, so that they know how to talk to it, and then in turn I add them (the remote SPs) back when they send me their own metadata in order to recognize them as authorized to talk to my local IdP:
-> ls providers/service/saml20-sp-remote/
(...)
someRemoteSPIdentifier.php
(...)
So, naturally, the content of providers/identity/saml20-idp-hosted/ is what I load into metadata/saml20-idp-hosted.php, and the contents of providers/service/saml20-sp-remote/ into metadata/saml20-sp-remote.php
You'll notice that there's no metadata/saml20-sp-hosted.php file in SimpleSAMLphp... why? Because, as I hope is clear from the above explanation, those are your local applications that you want to protect with SSO and hook into SimpleSAMLphp though an "authsource" entry (e.g. someLocalSPIdentifier.php) that's configured to talk to a *remote* IdP.
Clearer, hopefully? Or worse?