How to level up armor skills in legendary difficulty?
As a level 14 character with 200 displayed armor rating and 200 health, a mudcrab hit on ledgendary does ~15% of my health (I guess 20-30 hp).
Your problem is probably that your armor rating is too low. Wear armor (not clothes) on all four body slots (head, chest, hands, legs) to get the extra 100 hidden armor bonus. Upgrade all your armor at the blacksmith to increase your armor and spend perk points on your armor skills.
Check out the armor -> mitigation calculation. Here's how perks influence your armor.
The basics of leveling armor skill are: get hit, don't block and don't die. If you block, you get block skill instead of armor skill. If mudcrabs are the only foe you can survive, level your armor skill with them.
However, leveling armor skill doesn't really protect you... The best way to increase your armor is to get some armor perks. If you aren't going to get the perks, then leveling the skill can be ignored.