The pioneers of the old west used to trek across the prairies with jars of pickled hard boiled eggs. So pickling your eggs is one option of preserving them.
How long they'll last plain depends a lot on the temperature and conditions of where you're going. Keeping them hot isn't going to preserve them, keeping them cold will. I don't know how many eggs you're planning on bringing with you, but I would recommend you plan on eating them within the first 24 hrs. I wouldn't want to carry them around any longer than that myself, first of all, eggs aren't exactly light in your bag, and second–you don't want to mess around with salmonella while you're out in the backcountry, bacteria can start to grow in unrefridgerated eggs in as little as two hours, and food-poisoning can literally be a killer if you're stuck a days hike or more away from civilization.
If you want to keep them for longer, pack them in a small insulated lunch cooler with a frozen water bottle to keep them cool as long as you can. You could try freezing them first and keep them cool even longer, but freezing hardboiled eggs changes their texture when they thaw, so they may not be as appetizing after.
If for some reason you want to put off eating your eggs for a couple of days, you can actually construct an evaporative refrigerator in the backcountry that is powered by the sun. Basically you use the same principle as sweating to keep your food cold. The easiest way to do this is to dig a hole in the sand next to a creek, put your food in it, and stretch a damp towel or t-shirt over the top of the hole. If you can devise a way to keep the material wet (water bottle with a small hole in it, or divert a small trickle of water from the creek) then the sun will evaporate the water off of the material and significantly cool the inside of the hole.
There are many other ways to make an evaporative fridge, you can search the internet for more ideas, or use you own imagination to come up with something else on your own.
Evaporative fridge examples: