The Messenger of Allah ﷺ, whenever he greeted someone with salam, would repeat it three times, and whenever he spoke a word, he would repeat it three times.
أن رسول الله ﷺ كان إذا سلم سلم ثلاثا، وإذا تكلم بكلمة أعادها ثلاثا.
Bukhari reported it in the Book of Seeking Permission (6244), from Ishaq, Abdul-Samad informed us, Abdullah bin Muthanna narrated to us, Thumama bin Abdullah narrated to us, from Anas, and he mentioned it.His saying, "when he greeted, he greeted," means when he asked permission.