Suppose that a harmonic function h on a finite cylinder vanishes on the curved part of the boundary. This paper answers a question of Khavinson by showing that h then has a harmonic continuation to the infinite strip bounded by the hyperplanes containing the flat parts of the boundary. The existence of this extension is established by an analysis of the convergence properties of a double series expansion of the Green function of an infinite cylinder beyond the domain itself.