'A'isha reported that a eunuch used to come to the wives of Allah's Apostle (ﷺ) and they did not find anything objectionable in his visit considering him to be a male without any sexual desire. Allah's Apostle (ﷺ) one day came as he was sitting with some of his wives and he was busy in describing the bodily characteristics of a lady and saying: As she comes in front four folds appear on her front side and as she turns her back eight folds appear on the back side. Thereupon Allah's Apostle (ﷺ) said: It seems that he knows these things; do not, therefore, allow him to cater. She ('A'isha) said: Then they began to observe veil from him.
Hadith Commentary: Benefits and Issues: The Messenger of Allah (sallallahu alayhi wa sallam) used to think regarding Hit, the effeminate man (mukhannath), that he did not have interest in women, nor did he desire them. Therefore, he did not prevent him from entering his houses. However, when it became known to him that this person was interested in women, that he noticed their charms and qualities, and even informed others about them, he prohibited his entry. In fact, he had him expelled from Madinah and sent to an uninhabited place. Therefore, such effeminate men (mukhannathun) should not be allowed to enter homes.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 5691
Narrated Aishah, Ummul Muminin: A mukhannath (eunuch) used to enter upon the wives of Prophet ﷺ. They (the people) counted him among those who were free of physical needs. One day the Prophet ﷺ entered upon us when he was with one of his wives, and was describing the qualities of a woman, saying: When she comes forward, she comes forward with four (folds in her stomach), and when she goes backward, she goes backward with eight (folds in her stomach). The Prophet ﷺ said: Do I not see that this (man) knows what here lies. Then they (the wives) observed veil from him.
Shaykh Umar Farooq Saeedi
Benefits and Issues: In Surah An-Nur, the verse of hijab (31), among those from whom there is no need to observe hijab, (ghayru uli al-irbah) are also mentioned, meaning such elderly men who no longer have any desire for women. However, despite their age, if it is sensed that intellectually this man is still interested in women, then observing hijab from him is obligatory. It is not difficult to discern a person’s temperament and inclinations from his conversation and manner of sitting and rising, as is mentioned in the following hadith.
Source: Sunan Abu Dawood – Commentary by Shaykh Umar Farooq Saeedi, Page: 4107