BOSTON – A doctor pleaded not guilty Tuesday to possessing and receiving child pornography, including some that authorities said he had shipped to the student health center at the elite boarding school where he worked.

Richard Keller, 56, of Andover, entered the pleas at his arraignment at U.S. District Court in Boston on charges including two counts of receiving child pornography and one count of possessing child pornography.

An indictment handed down last week accused Keller, former medical director at Phillips Academy in Andover, of having pictures and video of boys from ages 7 to 16 engaged in sexually explicit conduct.

On Tuesday, Keller answered, “Not guilty, Your Honor,” when asked for his plea on the charges of receiving child pornography. He said, “I am not guilty,” when asked for his plea on the possession charge.

His lawyer declined to comment outside the courtroom.

Keller has been jailed since his September arrest after voluntarily agreeing to detention. If Keller hadn’t waived his rights to a detention hearing and a probable cause hearing, prosecutors would have provided the court with more details of the case against him.

Keller faces a maximum 20 years in prison, with a mandatory minimum of five years, if convicted of receiving child pornography. A conviction on the possession charge brings a maximum of 10 years.

Phillips Academy alumni include Presidents George W. Bush, George H.W. Bush and John F. Kennedy Jr.

Keller resigned from the prep school in 2011 after school officials said they wouldn’t renew his contract after 19 years. The academy has said its decision not to bring Keller back was based on professional misconduct unrelated to the federal case.

Keller has also worked at Boston’s Children’s Hospital and taught at Harvard Medical School. He voluntarily surrendered his state medical license in September while the Massachusetts medical board conducted its own investigation.

In an affidavit accompanying the criminal complaint against Keller, investigators said in 2011 they searched the records of an unnamed foreign company suspected of making child porn movies and found Keller’s name and orders for more than 50 titles, totaling over $2,695, sent to two addresses for him.

The addresses were a post office box he rented and the student health center at Phillips Academy, the affidavit said.

Investigators searched Keller’s house in September and found 500 high-gloss printouts and several dozen DVDs of child pornography, according to the affidavit.