Finite time control via output feedback: a general approach