Translation
(78) Good Manners and Form (Al-Adab)
كتاب الأدب
(15) Chapter: Al-Wasil is not the one who recompenses the good done to him by his relatives
(15) باب لَيْسَ الْوَاصِلُ بِالْمُكَافِي
Sahih al-Bukhari 5991 

Narrated `Abdullah bin `Amr:

The Prophet (ﷺ) said, "Al-Wasil is not the one who recompenses the good done to him by his relatives, but Al-Wasil is the one who keeps good relations with those relatives who had severed the bond of kinship with him."

حَدَّثَنَا مُحَمَّدُ بْنُ كَثِيرٍ، أَخْبَرَنَا سُفْيَانُ، عَنِ الأَعْمَشِ، وَالْحَسَنِ بْنِ عَمْرٍو، وَفِطْرٍ، عَنْ مُجَاهِدٍ، عَنْ عَبْدِ اللَّهِ بْنِ عَمْرٍو ـ وَقَالَ سُفْيَانُ لَمْ يَرْفَعْهُ الأَعْمَشُ إِلَى النَّبِيِّ صلى الله عليه وسلم وَرَفَعَهُ حَسَنٌ وَفِطْرٌ ـ عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ ‏ "‏ لَيْسَ الْوَاصِلُ بِالْمُكَافِئِ، وَلَكِنِ الْوَاصِلُ الَّذِي إِذَا قَطَعَتْ رَحِمُهُ وَصَلَهَا ‏"‏‏.‏
Reference : Sahih al-Bukhari 5991
In-book reference : Book 78, Hadith 22
USC-MSA web (English) reference : Vol. 8, Book 73, Hadith 20
  (deprecated numbering scheme)