EXHIBIT 23.1
Consent of Independent Registered Public Accounting Firm
We consent to the incorporation by reference in Registration Statement No. 333-05799 on Form S-8 of our report dated JuneĀ 27, 2023, appearing in this Annual Report on Form 11-K of the A.O. Smith Retirement Security Plan for the year ended December 31, 2022.
/s/ Reilly, Penner & Benton LLP
Reilly, Penner & Benton LLP
Milwaukee, Wisconsin
JuneĀ 27, 2023