Tell him NO, and tug on his leash. If he's not leashed, then be ready to stop him in his tracks as he's starting to go up. Also, if the people are down, have them stick their out every time he tries, and/or step on his back paws.
I tell my pup NO and stick my hand out in front of her face and if she try's to avoid me I fallow her doing the same thing. It might take a couple of times in doing so but it should work, once they understand what your doing. Good luck!
1.Cut up some thin hotdog pieces.Put them in a handy plastic bag or treat container/fanny pack.
2.Teach dog/pup to sit by luring into position with hotdog and saying sit at the same time.
3.When the dog sits give the treat.
4.Keep doing this untill the dog learns what sit means and will do it without being lured. Work in 5 min sessions two or 3 times a day. This shouldn't take to long it depends on you dog. Most will learn very quickly. When I sit I get yummy hotdog.
5.Put a leash on your dog or keep one by the door. Put the leash on before people come in(keep treats handy as well).
6.When the dog goes to jump up tell them to sit. With the leash make sure the dog doesn't actually jump on them. When they sit give'em a treat and lots of praise.
After the dog is performing well you can start phasing out the treats. Give one every other time(still give praise), then randomly like a slot machine. Then pretty soon you don't have to give treats anymore for that behavior.