Security of tenure entails protection of the tenant against the landlord. For example, the landlord is not allowed to unexpectedly force the tenant to leave. Furthermore, the landlord is required to take care of certain deficiencies and make sure the tenant has a pleasant stay. The landlord, however, is allowed to prematurely terminate the rental agreement under certain conditions. In order to do this, the landlord may need to request permission to the cantonal court judge. The landlord may approach the cantonal court judge in case the tenant fails to respond within six weeks to the written and registered announcement of termination, or when the tenant refuses to accept the termination.
The landlord can only base the request for premature termination of the rental agreement on a limited number of grounds, as is stipulated by law. In case your landlord terminates the rent, and you refuse to leave, you should seek solid advice at the local rent-team, the rent tribunal, or the student helpline. Bear in mind that you should at all times continue to pay the rent and adhere to your duties as a tenant. Otherwise, your may lose the legitimacy of your case.
Please be aware that in the case of host rent, there is a trial period of nine months. During this time, the house owner is free to terminate your stay without providing reasons and you are not protected by security of tenure.