This paper investigates the resilient leader-following consensus problem for a class of high-order multi-agent systems subject to unmatched lower triangular uncertainty dynamics and sensor–actuator attacks. Compared with previous work, the sensor and actuator attacks are modeled to be both time-varying and state-dependent, which makes the resilient consensus control more challenging. To deal with the unmatched uncertainties and sensor–actuator attacks, a new compensator with two online tuned dynamic gains is proposed relying only on the relative output measurements of neighboring agents. Then, using only the local compensation information, a fully distributed output feedback resilient protocol is designed to guarantee the leader-following consensus. Sufficient conditions in terms of matrix inequalities are derived to determine control gains and compensator parameters and simulation studies are presented to demonstrate the proposed theoretical results.