Exhibit 23.1 Consent of Independent Public Accountants As independent public accountants, we hereby consent to the incorporation by reference in this Form 8-K of our report dated January 22, 1999 on our audit of the consolidated financial statements of Camden National Corporation's Annual Report on Form 10-K for the year ended December 31, 1998 and to all references to our Firm included in this Form 8-K. We also consent to the incorporation by reference in this Form 8-K of our report dated January 21, 1999 on our audit of the consolidated financial statements of KSB Bancorp, Inc. for the year ended December 31, 1998, which report is included in the 1998 Form 10-KSB of KSB Bancorp, Inc. for the year ended December 31, 1998. /s/ Berry, Dunn, McNeil & Parker, LLC Portland, Maine December 30, 1999