Abu Said al-Khudri (RAA) narrated that the Messenger of Allah (ﷺ) said:
"Avoid sitting by the road side." The people then said, 'O Allah's Messenger (ﷺ), we cannot do without those meeting places in which we converse" So he said, "Well, if you insist (on that) give the road its due rights." They asked, 'What are the road's due rights?' He replied, "Lowering your gaze, abstaining from anything offensive, returning salutations, enjoining the right (Ma'ruf) and forbidding from evil deeds (Munkar)." Agreed upon.
English reference: Book 16, Hadith 1564
Arabic reference: Book 16, Hadith 1521