(53) بَابُ هَلْ لِلإِمَامِ أَنْ يَمْنَعَ الْمُجْرِمِينَ وَأَهْلَ الْمَعْصِيَةِ مِنَ الْكَلاَمِ مَعَهُ وَالزِّيَارَةِ وَنَحْوِهِ
Narrated `Abdullah bin Ka`b bin Malik:
Who was Ka`b's guide from among his sons when Ka`b became blind: I heard Ka`b bin Malik saying, "When some people remained behind and did not join Allah's Messenger (ﷺ) in the battle of Tabuk.." and then he described the whole narration and said, "Allah's Messenger (ﷺ) forbade the Muslims to speak to us, and so we (I and my companions) stayed fifty nights in that state, and then Allah's Messenger (ﷺ) announced Allah's acceptance of our repentance."
Reference: Sahih al-Bukhari 7225
In-book reference: Book 93, Hadith 84
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 9, Book 89, Hadith 331