A man from Pennsylvania has pled guilty to felony computer hacking, after being caught in the investigation into the so-called “Celebgate” hack of 2014.

The Celebgate incident saw the nude selfies of many female celebrities, such as Jennifer Lawrence, widely shared online. The victims’ photos had been backed up to the cloud storage accounts associated with their smartphones, and someone had gotten into those accounts and stolen the shots.

Ryan Collins of Lancaster has now been charged with computer hacking, with a recommended prison term of 18 months. According to a Justice Department statement, he pled guilty to a felony violation of the Computer Fraud and Abuse Act.

Collins accessed at least 50 iCloud accounts and 72 Gmail accounts.

It’s not entirely clear whether Collins was the one who leaked or shared the Celebgate photos themselves, as investigators could find no evidence that this was the case.

However, he was caught as part of the probe into that incident. In 2014, he had used standard phishing techniques on his victims, sending them emails that purported to come from Appleor Google, in order to get them to divulge their usernames and passwords.

“After illegally accessing the email accounts, Collins obtained personal information including nude photographs and videos, according to his plea agreement,” the statement read. “In some instances, Collins would use a software program to download the entire contents of the victims’ Apple iCloud backups.”

How can people protect themselves from this kind of violation? It’s hard to argue with the recommendation of the FBI’s David Bowdich in that statement: “[We] strongly encourage users of Internet-connected devices to strengthen passwords and to be skeptical when replying to emails asking for personal information.”

More from Entrepreneur

David provides constructive insight to help businesses focus on their company growth, build brand awareness and know when and how to raise money.

Starting, buying, or growing your small business shouldn’t be hard. Guidant Financial works to make financing easy for current and aspiring small business owners by providing custom funding solutions, financing education, and more.