Ubayy reported that he was present with the Messenger of Allah ﷺ during the Farewell Pilgrimage. The Prophet ﷺ praised Allah and extolled Him, then offered reminders and admonition, and said, "Treat women well, for they are dependents in your care, possessing nothing of their own. You have no right over them beyond that, unless they commit a clear act of indecency. If they do, separate from them in their beds and strike them in a way that causes no harm. If they obey you, then seek no means against them. You have rights over your wives, and your wives have rights over you. As for your right over your wives, it is that they not allow anyone you dislike to tread upon your bedding, nor admit into your homes anyone you dislike. And their right over you is that you treat them well in their clothing and their food."
حدثنا أبو بكر بن أبي شيبة حدثنا الحسين بن علي عن زائدة عن شبيب بن غرقدة البارقي
أبي أنه شهد حجة الوداع مع رسول الله ﷺ فحمد الله وأثنى عليه وذكر ووعظ ثم قال استوصوا بالنساء خيرا فإنهن عندكم عوان ليس تملكون منهن شيئا غير ذلك إلا أن يأتين بفاحشة مبينة فإن فعلن فاهجروهن في المضاجع واضربوهن ضربا غير مبرح فإن أطعنكم فلا تبغوا عليهن سبيلا إن لكم من نسائكم حقا ولنسائكم عليكم حقا فأما حقكم على نسائكم فلا يوطئن فرشكم من تكرهون ولا يأذن في بيوتكم لمن تكرهون ألا وحقهن عليكم أن تحسنوا إليهن في كسوتهن وطعامهن
Its isnad is sahih. Tirmidhi transmitted it in the chapter on breastfeeding, in the section on what has been said regarding the wife's right over her husband, hadith no. 1163, from the hadith of Husayn bin Ali through this route, and he said, hasan sahih.