A distributed controller is designed to achieve output consensus in directed networks of homogeneous Linear Time-Invariant (LTI) systems in the presence of constant and unknown disturbances. A method to find the control gains is derived, which is based on the Algebraic Ricatti Equation (ARE) and tools from algebraic graph theory. Output consensus with a leader whose dynamics are independent of the other agents is also presented. The derived control algorithms are illustrated with simulations and applied to a spacecraft formation control problem.