Snakes are one of the world's most versatile locomotors, at ease slithering through rubble or ratcheting up vertical tree trunks. Their adaptations for movement across complex dry terrain thus serve naturally as inspirations for search-and-rescue robotics. In this combined experimental and theoretical study, we perform experiments on inclined surfaces to show a snake's scales are critical anatomical features that enable climbing. We find corn snakes actively change their scale angle of attack by contracting their ventral muscles and lifting their bodies. We use this novel paradigm to design Scalybot, a two-link limbless robot with individually controlled sets of belly scales. The robot ascends styrofoam plates inclined up to 45°, demonstrating a climbing ability comparable to that of a corn snake in the same conditions. The robot uses individual servos to provide a spatial and temporal dependence of its belly friction, effectively anchoring the stationary part of its body while reducing frictional drag of its sliding section. The ability to actively modulate friction increases both the robot's efficiency over horizontal surfaces and the limiting angles of inclination it can ascend.