Exhibit 23.1
CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM
We consent to the incorporation by reference in this Registration Statement on Form S-3 of Trustco Bank Corp NY of our report dated March 1, 2023 relating to the consolidated financial statements and effectiveness of
internal control over financial reporting appearing in the Annual Report on Form 10-K of Trustco Bank Corp NY for the year ended December 31, 2022. We also consent to the reference to us as experts under the heading “Independent Registered Public
Accounting Firm” in such Registration Statement.
New York, New York
May 24, 2023