Roshi is an honorific for a senior Zen teacher, literally old master, and what matters in the tradition is not the title but what stands behind it, the transmission of the dharma from master to master.
The word and the reality
The title is given to a venerable Zen teacher, and its literal sense of old master conveys the respect due to age and attainment, but the substance to which it points is dharma transmission, the formal recognition by a master that a disciple has realised the teaching and is authorised to teach in turn, which is the true mark of authority in Zen. A roshi is properly one who has received such transmission and guides students, so the honorific rides on the transmission rather than replacing it.
Lineage and its verification
Dharma transmission places the teacher in a lineage reaching back, in the tradition account, through the Zen patriarchs to the Buddha, and it is this line of mind-to-mind transmission, verified by a recognised master, that the tradition treats as the guarantee of a teacher authority, more than any examination or institutional appointment. The reliance on personal transmission has also made the verification of a teacher standing a live concern, especially as Zen has spread to the West, where questions of who holds genuine transmission have arisen. The title roshi thus points beyond itself to the central Zen claim that the teaching is carried from awakened mind to awakened mind, and that a true teacher is one so recognised within a lineage.