Sahih al-Bukhari 7053
Book 92: Afflictions and the End of the World · Narrated by Ibn `Abbas
Arabic
حَدَّثَنَا مُسَدَّدٌ، عَنْ عَبْدِ الْوَارِثِ، عَنِ الْجَعْدِ، عَنْ أَبِي رَجَاءٍ، عَنِ ابْنِ عَبَّاسٍ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " مَنْ كَرِهَ مِنْ أَمِيرِهِ شَيْئًا فَلْيَصْبِرْ، فَإِنَّهُ مَنْ خَرَجَ مِنَ السُّلْطَانِ شِبْرًا مَاتَ مِيتَةً جَاهِلِيَّةً ".
English translation
Narrated Ibn `Abbas:The Prophet (ﷺ) said, "Whoever disapproves of something done by his ruler then he should be patient, for whoever disobeys the ruler even a little (little = a span) will die as those who died in the Pre-Islamic Period of Ignorance. (i.e. as rebellious Sinners)
Reference: Sahih al-Bukhari 7053, Book of Afflictions and the End of the World. English translation by Dr. Muhammad Muhsin Khan.