A Monroe County man has been sentenced to more than 20 years in prison for possessing and producing child pornography.