Arañña Sutta (AN 5:110)
“Endowed with five qualities, monks, a monk is fit to resort to isolated dwellings in the wilderness & in forest groves. Which five?
“There is the case where a monk is virtuous. He dwells restrained in accordance with the Pāṭimokkha, consummate in his behavior & sphere of activity. He trains himself, having undertaken the training rules, seeing danger in the slightest faults.
“He has heard much, has retained what he has heard, has stored what he has heard. Whatever teachings are admirable in the beginning, admirable in the middle, admirable in the end, that—in their meaning & expression—proclaim the holy life that is entirely perfect, surpassingly pure: Those he has listened to often, retained, discussed, accumulated, examined with his mind, & well-penetrated in terms of his views.
“He keeps his persistence aroused for abandoning unskillful qualities and for taking on skillful qualities. He is steadfast, solid in his effort, not shirking his duties with regard to skillful qualities.
“He attains—whenever he wants, without strain, without difficulty—the four jhānas that are heightened mental states, pleasant abidings in the here & now.
“He—with the ending of effluents—remains in the effluent-free awareness-release & discernment-release, having directly known & realized them for himself right in the here & now.
“Endowed with these five qualities, monks, a monk is fit to resort to isolated dwellings in the wilderness & in forest groves.”