A central New York man has been sentenced to 20 years in prison for having thousands of child pornography images on his computer and distributing the images to others on the Internet.