صحيح البخاري Sahih Bukhari كتاب الاستئذان The Book of Asking Permission
بَابُ السَّلاَمِ لِلْمَعْرِفَةِ وَغَيْرِ الْمَعْرِفَةِ:

(9) Chapter. To greet those whom one knows and those whom one does not know.

2 hadith
Hadith 6236
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ ، حَدَّثَنَا اللَّيْثُ ، قَالَ : حَدَّثَنِي يَزِيدُ ، عَنْ أَبِي الْخَيْرِ ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو ، أَنَّ رَجُلًا سَأَل النَّبِيَّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَيُّ الْإِسْلَامِ خَيْرٌ ؟ قَالَ : " تُطْعِمُ الطَّعَامَ ، وَتَقْرَأُ السَّلَامَ عَلَى مَنْ عَرَفْتَ ، وَعَلَى مَنْ لَمْ تَعْرِفْ " .
Narrated 'Abdullah bin 'Amr: A man asked the Prophet, "What Islamic traits are the best?" The Prophet said, "Feed the people, and greet those whom you know and those whom you do not know."
Hadith Reference Sahih Bukhari / The Book of Asking Permission / Hadith: 6236
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة
Hadith 6237
حَدَّثَنَا عَلِيُّ بْنُ عَبْدِ اللَّهِ ، حَدَّثَنَا سُفْيَانُ ، عَنِ الزُّهْرِيِّ ، عَنْ عَطَاءِ بْنِ يَزِيدَ اللَّيْثِيِّ ، عَنْ أَبِي أَيُّوبَ رَضِيَ اللَّهُ عَنْهُ ، عَنِ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ ، قَالَ : " لَا يَحِلُّ لِمُسْلِمٍ أَنْ يَهْجُرَ أَخَاهُ فَوْقَ ثَلَاثٍ ، يَلْتَقِيَانِ ، فَيَصُدُّ هَذَا وَيَصُدُّ هَذَا ، وَخَيْرُهُمَا الَّذِي يَبْدَأُ بِالسَّلَامِ " ، وَذَكَرَ سُفْيَانُ أَنَّهُ سَمِعَهُ مِنْهُ ثَلَاثَ مَرَّاتٍ .
Narrated Abu Aiyub: The Prophet said, "It is not lawful for a Muslim to desert (not to speak to) his brother Muslim for more than three days while meeting, one turns his face to one side and the other turns his face to the other side. Lo! The better of the two is the one who starts greeting the other."
Hadith Reference Sahih Bukhari / The Book of Asking Permission / Hadith: 6237
Hadith Grading محدثین: أحاديث صحيح البخاريّ كلّها صحيحة