Sahih Muslim | Book 20 | Chapter 34

Narrated by It has been narrated on the authority of Abu Sa'id Khudri that a man came to the Holy Prophet (may peace he upon him) and
It has been narrated on the authority of Abu Sa'id Khudri that a man came to the Holy Prophet (may peace he upon him) and said: Who is the best of men? He replied: A man who fights in the way of Allah spending his wealth and staking his life. The man then asked: Who is next to him (in excellence)? He said: Next to him is a believer who lives in a mountain gorge worshipping hid Lord and sparing men from his mischief.

Narrated by Abu Sa'id Khadri
It has been narrated (through a different chain of transmitters) on the same authority (i.e. Abu Sa'id Khadri) who said: A man asked: Messenger of Allah, which of men is the best? He said: A believer who fights staking his life and spending his wealth in the way of Allah. He asked: Who is next to him (in excellence)? He said: Next to him is a man who lives an isolated life in a mountain gorge, worshipping his Lord and sparing men from his mischief.

Narrated by
A version of the tradition narrated on the authority of Ibn Shihab has a little differently worded ending i.e. "A man in a mountain valley." but did not mention "next to him a man who...

Narrated by It has been narrated on the authority of Abu Huraira that the Messenger of Allah (may peace be upon him)
It has been narrated on the authority of Abu Huraira that the Messenger of Allah (may peace be upon him) said: Of the men he lives the best life who holds the reins of his horse (ever ready to march) in the way of Allah, flies on its back whenever he hears a fearful shriek, or a call for help, flies to it seeking death at places where it can be expected. (Next to him) is a man who lives with his sheep at a hill-top or in a valley, says his prayers regularly, gives Zakat and worships his Lord until death comes to him. There is no better person among men except these two.

Narrated by Abu Huraira
This hadith has been transmitted on the authority of Abu Huraira with a slight variation of wording.

Narrated by Abu Huraira
Two more versions of the tradition narrated by 'Abdullah b. Badr and Abu Huraira, respectively, have been handed down through different chains of transmitters with negligible difference in the wording.