Teaching a dog not to jump up at you and other people is a problem entirely of your own creation, harsh but true. You have been unconsciously dog training at its most basic level..... Action leads to reward and in this case you are encouraging your dog by patting your legs, using lovely voice sounds and stroking him when he lifts his front paws off the ground.
I know it’s hard, it may almost feel cruel, but the best thing you can do for your puppy is ignore him when he jumps up at you... From day one! And praise every single time he sits/lies down in front of you; make that effort, every time. Before you know it your dog will be greeting everyone with all four feet on the floor.
If you have an older dog with this in ground behaviour it will take longer to diminish this behaviour but it will work if you’re consistent and you reward consistently.
Also see my article on Punishment.