Children can contact teachers through social networking sites
School teachers using their home computers have been warned about the dangers of putting too much personal information on the internet.
Concerns were raised about teachers contacting pupils by e-mail, or communicating through social networking sites such as Bebo or Facebook.
Some fear that it could lead to the kind of accusations that have ruined careers in the past.
Teachers in Scotland have been asked to adhere to a new code of conduct.
Drawn up by regulatory body the General Teaching Council of Scotland, it warns teachers to be careful when online and approached by pupils.
Gary McDonald, technology teacher at Balerno Community High School in Edinburgh, said teachers had to be careful of getting into situations where they could be taken advantage of by a group of pupils, or by an individual.
He added: "Teachers should not involve themselves with social networking sites, or be in a situation where an online relationship could form with a pupil.
"In school there are guidelines to say don't be in a classroom alone with a pupil, all doors should be open, and from that point of view we are covered.
"Online we are not and teachers should be wary of involvement with pupils, particularly through social networking sites."
'Benefit and protect'
Annie Rankin, an English teacher at the same school, said the code of conduct sets out expectations for teacher behaviour in such circumstances.
She said: "There are some new technology issues that do come up. A friend of mine had a social networking page and was recently approached by a pupil to become their friend, to which they rapidly replied: 'no thanks'.
"In rural areas, where teachers live within the catchment areas of the school or perhaps have children who go to the same school, they may have pupils who are friends with their children and maybe even visit their house.
"At what point does it become the teacher/pupil relationship, or one of the friend's parent?
"There has to be a balance between building a rapport with pupils, but also maintaining a distance and a level of formality.
"There is always an element of naivety, particularly with those who are new to the profession, but this new code will benefit us and protect us."