Stranger = a person with whom you have no personal acquaintance. A newcomer.
A stranger is a stranger for our dogs and as such are given the stranger treatment. That treatment will vary vastly depending on the dog. Many dogs treat strangers as if they are long lost family members; others are cordial but that's as far as it goes and then there are dogs who treat strangers as strangers. We drill the message "don't talk to strangers," into our children's heads as youngsters; teaching them that you don't talk to people who you do not know. But with our dogs we expect them to welcome strangers with open arms or legs as it is. What's the deal?
We all want friendly dogs; we want everyone to think that our dogs are just the best dogs right? Even the best of dogs reserve the right to pass judgement on those who they do not know. In the beginning, way back when our dogs lived in wolf packs there was no such thing as a good stranger. Strangers meant something bad; an invading member of rival pack perhaps or a wolf out for no good. There were no friendly strangers and all were dealt with by a fiercely united pack.
So what if you have a dog that is not so friendly with strangers? You help them first to realize that strangers are not a bad thing. Do not have strangers approach your dog if they don't want to be approached; this is the first step for your dog to realize that strangers are not out for them. No eye contact, touching or talking to your dog. Once your dog sees that strangers are not solely interested in them; things start to lighten up. From there you can move to strangers come bearing gifts. Still no eye contact, just treats offered from an open hand that is not reaching out.
When you meet a dog or enter into someone's home that has a dog you should remain neutral. The dog will react how they will react and it is this that you need to gauge your greeting. As much as I love dogs I do not greet dogs when I enter a home either for a shoot or training. I watch the dog without looking at them and adjust my behavior accordingly. Even dogs that are of guarding or aggressive nature will adjust their behavior to more appropriate if you are neutral.
One of the biggest mistakes that humans make when they meet dogs is to pet them; often even lavishing attention on them. Depending on who is on the receiving end of this attention can send a situation in a very wrong direction. Luke use to be a very competitive guy; he loved to intimidate when at all possible. When someone came into our home and started petting immediately; he took that as a sign of weakness. After all these strangers were paying Luke (the king) lavish attention, and they didn't even know him. This to a dog means that they are conceding his status over them. Once these lowly newcomers then attempted to take matters into their own hands by walking into our house; Luke found it necessary to remind them who he was and who's house this was. The people were always shocked "I was just petting him," they would state with a puzzled face searching for answers. Ah yes; the human who does not understand canine.
Watch your dog interacting with strangers; their behavior will give you all the clues as far as what needs working on. It may be a fear based behavior which typically escalates only when the human persists in a greeting. There are dogs who will never be interested in meeting strangers; that is fine as well, they are good with their pack and don't need anyone else in their life. Listen and watch; our dogs really do give us all we need as far as the information that we need.