He's probably going through a fear period (as puppies pass thru several), and the best thing you can do is to be very patient with him, don't push him to "go be friendly", and find willing male participants to help you out. You want to support him thru this fear period, not "shove" him thru it. Have men drop over, basically ignore him, but toss him treats - let men be the source of all good things, let chicken rain from the sky (make men be the source of something really fabulous, not something store-bought or from a package). Maybe someone could come over, stay only for a minute or two, toss a few treats, and leave - but ignore him, don't try to pet and awww, he's so cute and convince puppy he needs to make friends. Puppy doesn't need to make friends with "scary object" right now, puppy first needs to realize object isn't so scary. Another time, someone come over, sit quietly on the couch, again ignore puppy, fine to converse with you and b/f - but occasionally just toss a treat puppy's way. Let puppy wander over and inspect on his own - omg, chicken! hey, wow, from the scary man, cool!! Again, no petting, unless puppy decides, hey, I like this guy, he's not so bad. Puppy might beg for more - maybe then a few pets. Then, just keep it brief. Some of these fear periods can be tricky. Keep after bf's friends to "obey the rules" for now, for puppy's sake - just take it slow, let puppy come around and decide men are ok. Arm them with lots of chicken (or hot dogs, or whatever - keep something handy in the fridge they can just grab and use - you give it to them), and tell them in advance.
As for when out on the street on walks, don't let "strange" men come up and pet right now - if they ask, say he's shy and you're working with him, say whatever you want, but just say NO. When you're approaching a strange man, start feeding that fabulous chicken again - make sure you're always prepared. He'll start associating men (or scary stuff - he might very well come up with something else besides men, too) with that fabulous treat of his dreams, and "it" won't be so bad afterall. Just give him some time - he's a little dog, and it can be a scary world to maneuver out there.
Hope this helps, good luck!