Well you are correct, he is not doing this maliciously, but boy it hurts.
He is in the middle of teething and really needs the release. I would suggest getting lots of teething things for him and keep them all over the place. Also get some of the ones that can be frozen and keep them in the freezer. The cold will help him. Is he eating bananas? You can cut some up and freeze them. Remember, bananas stain so be sure to wash his hands and face really well when he is finished. I used to give my daughter frozen mini bagels. I would cut them into fourths serve them to him frozen.
For a while I also suggest when you carry him, pick him up and have him face away from you. If he insist on being over your shoulder, place a towel or blanket, thick enough for him to bite on, without getting your shoulder. Always have a teether in your pocket or in your hand so that you can place it in his mouth, EVERY time he tries to bite.
If he bites you, pick him up and look at him with a stern face and say "no biting". Do not smile or laugh or yell. Babies will respond to stern faces.
This is a phase. But you need to protect yourself. This is not toddler biting, that is a whole different thing.