Giving a key
In a chometz sale arrangement, the non-Jew must have access to the area that is rented to him and to the chometz that was sold to him for the entire Pesach. Thus, one should lechatchila give him a key to the room where the chometz is in (מ''ב תמ''ח סקי''ב ).
Permission to enter
If one will be home for Pesach and he is not interested in giving the non-Jew a key to his house, it suffices to write in the document of sale and the harsha’ah that the non-Jew has permission to come take his chometz from the house at any time (מ''ב שם ).
Knowing where the key is
If one will not be home for Pesach or for part of Pesach, he should leave a key with a neighbor and write in the signed harsha’ah he drafted with a rav where the key is. If there is also a combination lock, he must write the code or at least the phone number of someone who can tell him the location of the key or the code to the lock.
If one cannot leave a key with a neighbor, he can leave a key with the rav who is selling his chometz and write in the harsha’ah that the key can be found with Rav Ploni at such-and-such place. [He should remember to retrieve the key after Pesach so it does not join the keys that have piled up from past years...]