EX-23 4 b53286mcexv23.txt EX-23 CONSENT OF KPMG LLP EXHIBIT 23 Consent of Independent Registered Public Accounting Firm The Board of Directors MASSBANK Corp. We consent to incorporation by reference in the registration statements on Form S-8, (File Nos. 33-11949, 33-82110 and 33-118028) of MASSBANK Corp. of our reports dated March 14, 2005, with respect to the consolidated balance sheets of MASSBANK Corp. and subsidiaries as of December 31, 2004 and 2003, and the related consolidated statements of income, cash flows and changes in stockholders' equity for each of the years in the three-year period ended December 31, 2004, management's assessment of the effectiveness of internal control over financial reporting as of December 31, 2004 and the effectiveness of internal control over financial reporting as of December 31, 2004, which reports appear in the Annual Report on Form 10-K of MASSBANK Corp. /s/ KPMG LLP Boston, Massachusetts March 14, 2005