Sheikh al-Sharîf Hamzah al-Fa`r, professor at Umm al-Qurâ University
It is permissible for anyone who owns a property to rent it to another person. It is also permissible for a person who leases a property to lease it in turn to another party.
Even if - as is mentioned in the question - the government is the one renting the property to the primary leaseholder, it is still permissible for the leaseholder to rent it to a third party as long as the government allows it.
There is no objection in Islamic Law to “key money” if it is a prevalent local custom in the area, since this money is being paid in exchange for the owner or tenant giving up his own right.
However, he must not lie to the new leaseholder and claim that he has paid “key money” when he himself rented the house if he actually did not do so.
He has the right to ask for “key money” even if he did not pay it before, but he must not lie.
And Allah knows best.
Source: Islam Today