Birds are really clever and they don't take long to learn lessons. Take heart! If you remove your bird from your shoulder each and every time he bites (not for punishment, but for distraction), he will eventually learn not to.
My Alexandrines have massive bills and can remove hunx of flesh (ask me how I know!), so they had to learn early not to nom on my ears. Mostly, I would just turn my head away and go 'Ah-ah-ah! Don't bite Mummy!' This worked to stop them from squashing my earrings as well (only four pairs later).
It's interesting to note the Beaks will still bite my kids' ears. They have been told to calmly remove the bird and do as I do, but they're not as patient as me and usually squawk and make a fuss (that's the kids, not the birds). I think this has rewarded the birds in some way and so they persist where they can get away with it. The main thing is, you have to take some action *each and every time* the bird bites. It's a clear message and he'll learn quicker than you think.
On another note, my vampiristic Galah, Dominic, just adores sitting on my husband's shoulder and lovingly pulling the hairs off his ears. Since these hairs have always embarrassed poor hubby, he has formed a symbiotic relationship with Dom wherein he gets to stroke the bird's soft feathers and enjoy the bonding while Dom uproots the ear-hairs. Weird! Dominic sat on my arm for ten minutes last night and as a parting shot lifted about a pea-sized chunk out of my flesh. It's the second-worst bite I've ever had! I don't discipline Dom because he has a damaged personality (through no fault of his own) and is a senior cit. His happy relationship with the men in the family is enough for now. I continue to work with him and am willing to get munched from time to time. Sigh. Just call me 'Pellet'...