Abu Saeed Khudri reported,

The Prophet ﷺ said, "Beware of sitting in the roadways."The companions replied, "Messenger of Allah, we have no choice but to sit there to converse."He said, "If you must sit, then give the road its due."They asked, "What is the due of the road, Messenger of Allah?"He answered, "Lowering the gaze, refraining from causing harm, returning the greeting of peace, enjoining what is right, and forbidding what is wrong."

Bukhari 6229

Sahih

حدثنا عبد الله بن محمد أخبرنا أبو عامر حدثنا زهير عن زيد بن أسلم عن عطاء بن يسار

عن أبي سعيد الخدري رضي الله عنه

أن النبي ﷺ قال إياكم والجلوس بالطرقات فقالوا يا رسول الله ما لنا من مجالسنا بد نتحدث فيها فقال إذ أبيتم إلا المجلس فأعطوا الطريق حقه قالوا وما حق الطريق يا رسول الله قال غض البصر وكف الأذى ورد السلام والأمر بالمعروف والنهي عن المنكر

البخاري 6229صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Permission to enter
Chapter
Allah's saying, "O you who believe, do not enter houses other than your own until you have asked permission and greeted their inhabitants. That is better for you, so that you may remember. If you find no one therein, do not enter until permission is given to you. And if it is said to you, 'Go back,' then go back, for it is purer for you. And Allah is Aleem of what you do. There is no blame upon you for entering uninhabited houses in which there is benefit for you. And Allah knows what you reveal and what you conceal."
Numbering
Darussalam 6229
Bukhari 6229