Homosexuality is not mentioned at all in the Confucian scriptures. It is neither listed as a sin nor is it condoned. "Biting the bitter peel", a euphemism for homosexual relations, generally taken to mean anal sex, is mentioned as having been practiced by several individuals in the Book of History as well as the Spring and Autumn Annals, both texts belonging to the Five Classics. The description seems roughly parallel to the Greek examples, where an older male serves as the "lover" and the younger male serves as the more feminine "beloved". It is unclear in the texts whether these relationships were expected to end once the "beloved" reached the age of majority in these texts -- though it would seem unlikely given the strong class divide which is also present (the lord acts as the "lover" and various servants fill the role of "beloved").
Mencius, one of the most influential Confucian philosophers of all time, argued that to fail to have children is the most unfilial of all acts.
Regarding homosexuality in the modern day, according to A. Adamczyk and Y. Cheng in their essay "Explaining attitudes about homosexuality in Confucian and non-Confucian nations: is there a 'cultural' influence?", residents of Confucian counties are less tolerant than Europeans and Americans. One reason given for this difference is the emphasis on Confucian values in many Asian societies.
Whatever the position on homosexuality itself, many modern-day Confucian leaders oppose same sex marriage. After Confucius was cited by Justice Kennedy in the majority decision of Obergefell v. Hodges legalizing same-sex marriage in the United States, Professor Zeng Yi of the Philosophy Department of Tongji University was blunter, stating that Kennedy had “distorted” Confucius, and opining that any Confucian should view homosexuality as “a crime against humanity.” The Classic of Changes, a seminal Confucian treatise of divination and cosmology, claims that traditional gender identities are an immutable reflection of cosmic principles.
The deputy Chairperson of the Indonesian Confucian High Council (MATAKIN), Uung Sendana, called on all parties to respect LGBT people. He also stressed that the public should not be vigilant against LGBT people. "They are God's creatures that must be loved, there should be no violence against them," Uung said at a press conference at the MUI office, Central Jakarta, Thursday (18/2). In the Confucian scripture, Uung revealed, marriage can only be carried out by men and women. The goal is to glorify God and ancestors and continue the descent. So, if there is a same-sex marriage, then it is not following the teachings of Confucius.