In this paper, we consider the leader-following consensus problem for a multiple rigid spacecraft system whose attitude is represented by the unit quaternion. Most results on this problem rely on the assumption that every follower can access the state of the leader and are obtained via a decentralized control manner. By developing a nonlinear distributed observer for the leader system, we can solve this problem via a distributed control scheme under the mild assumptions that the state of the leader can reach every follower through a path and that the communication between followers is bidirectional. Moreover, our result can accommodate a class of desired angular velocities generated by a marginally stable linear autonomous system.