  We study hypoelliptic stochastic differential equations (SDEs) and their
connection to degenerate-elliptic boundary value problems on bounded or
unbounded domains. In particular, we provide probabilistic conditions that
guarantee that the formal stochastic representation of a solution is smooth on
the interior of the domain and continuously approaches the prescribed boundary
data at a given boundary point. The main general results are proved using fine
properties of the process stopped at the boundary of the domain combined with
hypoellipticity of the operators associated to the SDE. The main general
results are then applied to deduce properties of the associated Green's
functions and to obtain a generalization of Bony's Harnack inequality. We
moreover revisit the transience and recurrence dichotomy for hypoelliptic
diffusions and its relationship to invariant measures.
