One of the hardest parts of public manners for our friendly dogs is calm while meeting new human friends. We usually try to teach our dogs from an early age that human friends are SO. Much. FUN.
Sometimes we do our work too well! Our dogs love to say hello so much that it is hard for them to maintain their composure, or even respond to cues like "Sit" and "Stay" as a friendly stranger is approaching.
Here's an alternate idea: instead of focusing on having your dog sit and stay before he can say hello, instead ask him to do his favorite trick (or two, or three). Reward with treats from your pocket or praise from you (not from the friendly stranger). These trick behaviors are often the behaviors we reward the most with our dogs, both with treats and with our enthusiasm. That means that when you ask for "Shake!," your dog has a long history of that behavior being really exciting and worth doing! Contrast this with boring "Stay," which isn't nearly as much fun.
Your dog will likely find it a lot easier to do his trick skills when he's excited - and it will be a big crowd pleaser too! This is a great way to change your dog's greeting routine from "Friendly stranger approaches and I jump on them and they love on me and it's the best thing ever!" to "Friendly stranger approaches and I show off all my tricks and my human is happy because I'm not jumping on the stranger!"