We like hugging.
We hug in greeting and we hug in parting. We hug to show love, support, happiness, and much more.
Dogs however, do not have a language for hugs the way we do.
This is because they walk on four legs and do not have free arms the way humans do.
Why Dogs Do Not Like Hugs.
According to experts (Turid Rugaas and Patricia McConnell), the closest thing a dog knows to a hug is mounting or placing a paw on another dog’s neck and back. Both of these gestures are commonly used for dominance.
When you try to hug a new or unknown dog, he will likely interpret that gesture as threatening and will either run away, submit, or return the challenge.

Hug Dog - Teach Your Dog to Enjoy Hugging.
Many people naturally find it disturbing when dogs shy away from their touch, or worse, respond with dog aggression. This is not surprising, because when a person shies away from our hug or responds with violence, we can quite rightly surmise that the object of our affection may not feel the same way as we do.
However, when dogs do it, it is not from lack of love or dislike. The dog is just misinterpreting our gestures because he speaks a different language than we do.
My Shiba Inu used to dislike any kind of hugging, but now he tolerates it, and will sometimes even come over and ask for some hugs.
Hug Dog - Shiba Inu Sephy will tolerate hugs but he is generally a Lone Ranger.
Can a Dog Learn to Like Hugs?

Shiba Inu Sephy will tolerate some hugs outside because he gets to look at interesting things.
Most definitely!
All you need to do is to teach him that when you are hugging him you are not trying to dominate him. Instead, show him that hugging means dog play, dog toys, and yummy dog treats.
Start handling exercises with your dog as soon as possible. It does not matter how old your dog is; all dogs can learn to like or tolerate handling.
First get your dog to go into a down position. Then touch his body briefly, and treat him; touch his paw briefly, and treat him; touch his ear briefly, and treat him; and so on. Once your dog is comfortable with brief touches, you can start to lengthen the duration of the touch.
Use a soft touch and do not poke. Make sure that you do not push things too quickly and spook him.

Can a Dog Learn to Like Hugs? - Shiba Inu Sephy tolerating a dog hug for food.

Handling exercises get your dog comfortable with you touching him.

Handling exercises also help to build trust and establish pack leadership.
Dogs are usually more sensitive about handling on their paws, ears, and muzzle, so make sure to proceed slowly in those areas. Handling exercises get your dog comfortable with you touching him, and is extremely useful during dog grooming, body examinations, or dog medication time.
Handling exercises also help to build trust and establish pack leadership.
After your dog becomes comfortable with you touching his body, you may try and put your arm over him. Put an arm over his torso, treat, remove arm. Repeat and only lengthen the duration if your dog is comfortable with it.
By repeating these exercises and pairing it with food, your dog will soon learn that hugging can be fun because it means getting yummy treats.
Note: If your dog is aggressive or if your dog bites at you, then it is best to first address the dog or puppy biting issue. Make sure to get a professional trainer if necessary.

By pairing hugging with food, your dog will soon learn that hugging can be fun and rewarding.
Buying Your Dog’s Hugs?

Buying Your Dog's Hugs and Licks?
Some people may object to pairing handling and dog hugs with food. They feel that they are somehow bribing or paying for their dog’s love and affection.
However, remember that your dog is not a human. To a dog, hugging is not a sign of love or affection, but rather a sign of dominance. We are merely teaching our dog to re-associate hugging with something good, like food, rather than something stressful, like dominance.
Research also shows that dogs, like most animals, respond to conditioning. They will repeat behaviors that get good results (e.g. food), and stop behaviors that get bad results (e.g. time-out). Using food rewards, is just an effective means of getting them to repeat behaviors that you like.
In any case, you already feed your dog everyday. Instead of giving him his food in a silver bowl, just give it to him slowly for working with you on dog hugging exercises. In this way, your dog gets to work for his food, your bond and leadership with him are both strengthened, and you get dog hugs.

Buying Your Dog's Hugs? - Food helps a dog associate hugging with something positive rather than with dominance.
Hug Dog – Dos and Don’ts

Hug Dog - Dos and Don'ts

Hug Dog - Don't hug your dog for too long.
- Don’t hug your dog too tightly. If you hug your dog too tightly, he may feel physical discomfort. He may also get stressed because his freedom of movement is being limited, and he can no longer run away if he needs to.
- Don’t hug unknown dogs. Unknown dogs may not have had the hugging exercises listed above, and may think you are trying to dominate them. In addition, some dogs may not generalize hugging across different humans. They may only allow their owners to do it, and no one else.
- Don’t hug your dog for too long. Some dogs actually like hugging whereas others may only tolerate it. In addition, a dog may sometimes want to be alone to rest or sleep. Never force a dog hug, and if your dog wants to move away, let him do so. Humans are not always up for a hug either.
- Keep track of the environment. Sometimes your dog may decide that hug time is over because of changes in the environment. For example, a dog or person comes into view, there is a new, unfamiliar sound, or a squirrel appears on a nearby tree. Let your dog go when he starts showing any signs of agitation.
- Protect your dog from unwanted hugs. If your dog does not enjoy hugs, especially from strangers, then make sure to keep strangers away. This is also important for dogs who are sensitive about their personal space. When attempting a greeting, educate people on how your dog likes to be greeted. However, it is best not to greet people with bad energy (afraid of dogs, too excited, or too nervous).

Never force a dog hug, and if your dog wants to move away, let him do so. Humans are not always up for a hug either.
lol – During thunderstorms *I* am the one running to my dogs for hugs.
Yep: my dogs are both hugger-happy. Especially during thunderstorms, when they will both try to get hugs at the same time. I guess I started them young, and was doing the right things by accident. Your hub showed me why they worked, thanks!