Diverse locomotor behaviors emerge from the interactions between the spinal central pattern generator (CPG), descending brain signals and sensory feedback. Salamander motor behaviors include swimming, struggling, forward underwater stepping, and forward and backward terrestrial stepping. Electromyographic and kinematic recordings of the trunk show that each of these five behaviors is characterized by specific patterns of muscle activation and body curvature. Electrophysiological recordings in isolated spinal cords show even more diverse patterns of activity. Using numerical modeling and robotics, we explored the mechanisms through which descending brain signals and proprioceptive feedback could take advantage of the flexibility of the spinal CPG to generate different motor patterns. Adapting a previous CPG model based on abstract oscillators, we propose a model that reproduces the features of spinal cord recordings: the diversity of motor patterns, the correlation between phase lags and cycle frequencies, and the spontaneous switches between slow and fast rhythms. The five salamander behaviors were reproduced by connecting the CPG model to a mechanical simulation of the salamander with virtual muscles and local proprioceptive feedback. The main results were validated on a robot. A distributed controller was used to obtain the fast control loops necessary for implementing the virtual muscles. The distributed control is demonstrated in an experiment where the robot splits into multiple functional parts. The five salamander behaviors were emulated by regulating the CPG with two descending drives. Reproducing the kinematics of backward stepping and struggling however required stronger muscle contractions. The passive oscillations observed in the salamander's tail during forward underwater stepping could be reproduced using a third descending drive of zero to the tail oscillators. This reduced the drag on the body in our hydrodynamic simulation. We explored the effect of local proprioceptive feedback during swimming and forward terrestrial stepping. We found that feedback could replace or reduce the need for different drives in both cases. It also reduced the variability of intersegmental phase lags toward values appropriate for locomotion. Our work suggests that different motor behaviors do not require different CPG circuits: a single circuit can produce various behaviors when modulated by descending drive and sensory feedback.