I saw a man whom people were dispersing from according to his opinion. He would not say a thing except that they followed it. I asked, "Who is this?"They replied, "This is the Messenger of Allah ﷺ."I said, "Upon you be peace, Messenger of Allah," twice.He said, "Do not say 'Upon you be peace,' for 'Upon you be peace' is the greeting of the dead. Say instead, 'Peace be upon you.'"I said, "Are you the Messenger of Allah?"He replied, "I am the Messenger of Allah, the one whom, when harm befalls you and you call upon Him, He removes it from you. When a year of drought strikes you and you call upon Him, He causes the earth to grow for you. When you are in a barren land or open wilderness and your mount is lost, if you call upon Him, He returns it to you."I said, "Give me some counsel."He said, "Never insult anyone."So I never insulted anyone after that, neither a free man, nor a slave, nor a camel, nor a sheep.He continued, "Do not belittle any act of kindness, even speaking to your brother with a cheerful face directed toward him, for that is among acts of kindness. Raise your lower garment to mid-calf, and if you refuse, then to the ankles. Beware of letting your garment trail, for it is from arrogance, and Allah does not love arrogance. If a man insults you and reproaches you with something he knows about you, do not reproach him with what you know about him, for the consequence of that falls upon him."
حدثنا مسدد حدثنا يحيى عن أبي غفار حدثنا أبو تميمة الهجيمي وأبو تميمة اسمه طريف بن مجالد
رأيت رجلا يصدر الناس عن رأيه لا يقول شيئا إلا صدروا عنه قلت من هذا قالوا هذا رسول الله ﷺ قلت عليك السلام يا رسول الله مرتين قال لا تقل عليك السلام فإن عليك السلام تحية الميت قل السلام عليك قال قلت أنت رسول الله قال أنا رسول الله الذي إذا أصابك ضر فدعوته كشفه عنك وإن أصابك عام سنة فدعوته أنبتها لك وإذا كنت بأرض قفراء أو فلاة فضلت راحلتك فدعوته ردها عليك قال قلت اعهد إلي قال لا تسبن أحدا قال فما سببت بعده حرا ولا عبدا ولا بعيرا ولا شاة قال ولا تحقرن شيئا من المعروف وأن تكلم أخاك وأنت منبسط إليه وجهك إن ذلك من المعروف وارفع إزارك إلى نصف الساق فإن أبيت فإلى الكعبين وإياك وإسبال الإزار فإنها من المخيلة وإن الله لا يحب المخيلة وإن امرؤ شتمك وعيرك بما يعلم فيك فلا تعيره بما تعلم فيه فإنما وبال ذلك عليه
Its isnad is sahih. Tirmidhi narrated it in the chapter on Seeking Permission, in the section on the dislike of saying "Alayka as-salam" (Peace be upon you) as an opening greeting, hadith 2722, from the hadith of Abu Ghifar, in abridged form, and he said, "Hasan sahih." Nasai also narrated it in Al-Kubra, hadith 10149-10152, and in Amal al-Yawm wal-Layla, hadith 317-320. Al-Hafiz declared it sahih in Fath al-Bari, 5/11. It has another route in Ibn Hibban, hadith 866.