Exhibit 23.7

Consent of Independent Auditors

We consent to the incorporation by reference in the registration statement on Form S-3 of Hannon Armstrong Sustainable Infrastructure Capital, Inc., of our audit report dated March 29, 2023, with respect to the consolidated balance sheets of SunStrong Capital Holdings, LLC as of December 31, 2022 and 2021, and the related consolidated statements of comprehensive income (loss), changes in members’ equity, and cash flows for each of the years in the three-year period ended December 31, 2022, and the related notes, which appears in the Annual Report on Form 10-K/A of Hannon Armstrong Sustainable Infrastructure Capital, Inc., for the year ended December 31, 2022.

/s/ KPMG LLP

San Francisco, California

December 8, 2023