A homeless man accused of entering Jennifer Aniston's (search) rented Malibu beach house was ordered Wednesday to stay away from her for three years.

On Aug. 25, David Hesterbey (search), 48, allegedly took a taxi to the home on Pacific Coast Highway, climbed over a 9-foot fence and entered the house.

The restraining order issued by a judge Wednesday forbids Hesterbey from coming within 100 yards of the former "Friends" star, her home, work or vehicle.

Aniston was away filming a movie in Chicago when the transient allegedly entered her home and told her employees he was "looking for Jennifer," authorities said.

When a worker confronted Hesterbey, he became startled and fled the house, jumping a fence and running toward the beach, officials said. He was arrested later that day while walking along the beach near Aniston's home.

Hesterbey has a prior burglary conviction in Santa Barbara County, prosecutors said.

He remains in custody on $70,000 bail and faces first-degree burglary and petty theft charges. He pleaded not guilty last month and is due in court for a hearing on Sept. 26.

If convicted, he could be sentenced to as much as six years in prison.