Addressing a cover letter to the hiring manager is appropriate in most situations. It's always better to include a generic greeting, like "Dear Hiring Manager," if you don't know the name of the hiring manager. It's also preferable to use if you're not sure of the accuracy of the hiring manager's information.