It is narrated from Sayyiduna Mughirah bin Shu'bah (may Allah be pleased with him); he said: "I was with the Messenger of Allah (peace and blessings be upon him) on one of his (peace and blessings be upon him) journeys, and whenever the Messenger of Allah (peace and blessings be upon him) went (to relieve himself), he would go far away."
Hadith Referenceالمعجم الكبير للطبراني / باب الميم / 18189