EXHIBIT 23 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM The Board of Directors Sterling Bancorp: We consent to incorporation by reference in the Registration Statements on Form S-8 (No.333-97009) and Form S-3 (No.333-82296) of Sterling Bancorp of our report dated March 29, 2005 relating to the consolidated balance sheets of Sterling Bancorp and subsidiaries as of December 31, 2004 and 2003, and the related consolidated statements of income, comprehensive income, changes in shareholders' equity and cash flows for each of the years in the three-year period ended December 31, 2004, and the consolidated statements of condition of Sterling National Bank as of December 31, 2004 and 2003 which report appears in the annual report on Form 10-K of Sterling Bancorp. Our report refers to the restatement of the Company's 2003 and 2002 consolidated financial statements, as more fully described in Note 2 to the consolidated financial statements. /s/ KPMG LLP New York, New York March 31, 2005 PAGE 80