EXHIBIT 23.1 CONSENT OF INDEPENDENT REGISTERED PUBLIC ACCOUNTING FIRM -------------------------------------------------------- The Board of Directors CNB Financial Corp.: We consent to the incorporation by reference in the registration statement on Form S-8 of CNB Financial Corp. of our report dated March 22, 2007, with respect to the consolidated balance sheet of CNB Financial Corp. and subsidiary as of December 31, 2006, and the related consolidated statements of operations, stockholders' equity, and cash flows for the year then ended, which report appears in the December 31, 2007 Annual Report on Form 10-KSB of CNB Financial Corp. Our report includes a paragraph that refers to the adoption of Statement of Financial Accounting Standards No. 123(R), "Share-Based Payment," effective January 1, 2006. /s/ KPMG LLP Boston, Massachusetts August 7, 2008