Anas reported that the Prophet ﷺ, whenever he gave the greeting of peace, would repeat it three times, and whenever he spoke a word, he would repeat it three times.In another narration, whenever he spoke a word, he would repeat it three times so that it would be clearly understood from him, and whenever he came upon a group of people and greeted them, he would give them the greeting three times.
عن النبي ﷺ: أنه كان إذا سلم سلم ثلاثا، وإذا تكلم بكلمة أعادها ثلاثا. وفي رواية: أنه كان إذا تكلم بكلمة أعادها ثلاثا حتى تفهم عنه، وإذا أتي على قوم فسلم عليهم سلم عليهم ثلاثا.
Bukhari narrated it in the Book of Knowledge (94, 95) from Abda bin Abdullah, who said, Abdul-Samad narrated to us, who said, Abdullah bin Muthanna narrated to us, who said, Thumama bin Abdullah narrated to us, from Anas, and he related it.As for his statement, "and if he came upon a group of people, he would greet them three times," Abu Bakr Ismaili said, "It appears that its meaning is a greeting seeking permission to enter, according to what Abu Musa and Abu Saeed narrated from the Prophet ﷺ. But as for someone passing by and greeting a man or a group of people, the established practice among the Muslims is that one greets only once."Bayhaqi narrated it in Al-Madkhal (598) from Abu Amr the man of letters, who said, Abu Bakr Ismaili informed us, and he related it.