Probably the most distressing problem -- aside from dogs that actually attack people -- is a dog that is aggressive because of fear. I have seen my share of them and I have never found a one-size-fits-all solution to the problem. Every dog is different and you have to approach them that way. If you expect one training method to work every time, you will be disappointed and the dog will be a basket case.
You can usually tell a fearfully aggressive dog by behavior such as sneaking up behind and trying to nip someone, lurching at bigger dogs and growling, barking at bigger dogs, barking incessently at any strangers (two-legged or four-legged). A mean dog doesn't try a hit-and-run method and doesn't bark first. Mean dogs go for the kill with no warning.
Fearful dogs are trying to get the bluff in on others so they won't be hurt. They need to be convinced that they are in no danger and that you aren't in any danger either. When you have fearful dogs on the leash or in a crate they will usually show out more. They feel vulnerable in a crate. On a leash, they are also restricted and they can feel that they need to protect you or they can feel your anxiety or fear that something bad is going to happen. Dogs are incredibly sensitive to our feelings and emotions.
I always begin by creating a bond between me and the dog by walking it, feeding it, and loving on it. Then I try a number of things to see what works:
Spray the dog with water or water and lemon juice to stop it from barking.
Give it treats to get its attention off whatever it thinks is a threat and rewarding it further when it calms down.
Telling it, "No barking!" and standing before it with a stern look on my face.
Snapping my fingers or blowing a whistle to get its attention and then moving into its space to make it back away.
If I'm out in the yard and it starts fence-fighting and barking I pick it up and say "No!" and take it inside. I leave the dog inside and go back outside, knowing that the dog wants to be with me. I let it back out after a minute. Every time it starts barking and not minding me, I take it back inside and leave it there. This usually works, but you might have to do it numerous times before it sinks in.
That's the key here as it is with all training -- making it clear to your dog what you want out of it. Often, we send inconsistent and muddled messages so it's no wonder our dogs keep misbehaving.
Mind you, I have two dogs of my own who show fear aggression and I have used all of these methods. Nothing has completely worked, although I have seen improvement.
Training takes an enormous amount of patience and that is something that is often in short supply. I know I don't have any to loan out!
So if you are struggling with this problem, join the crowd. Just don't give up.