You have posted:
-" employee will be liable to pay 2 month salary in case he leaves the org. within 1 year".
and
-"I have to work two months without salary"
Both of these two are all together different situations.
You can not be made to work without salary for a day.
The liability of the employee to pay an amount is to be described for some certain/specific reason e.g. liquidated damages (the employer may have to explain and validate the amount)
or training thru which employee is able to acquire some additional qualifications/kill (the employer may have to explain and validate the amount).
The employee in matter cited by you has agreed to a condition so be it a letterhead or any other paper.
Now the situation comes out to be whether such a clause can be inserted or not?
The employers have been and shall continue to look for various ways and means to keep the employee in employment for the longest possible time or for a reasonable time of say 1 year and thus check the attrition and overheads. From business point of view the employee under service agreement/bond shall be economical, easy to handle and control and shall offer less or no dissent.
The employee should also become aware and well informed and thus should look for ways and means to stay away from legal traps. Majority of the employees do not contest the decisions of employer as either they are ill informed and unaware or get easily subdued. Union/Guild/Association/Internal Council of employees takes care of such situations.
The employee in matter cited by you should consult a competent and experienced service lawyer/law firm and the lawyer shall be able to defend the employee. In almost all the cases an intelligent lawyer shall be able to defend the employee.
If the employee ends up working for 2 months without salary it would amount to working for the employer and paying the salary to the employer.
The only thing that is required is before the employee hastens to sign on the dotted line and falls into legal traps, the employee should always consult elders in the family, competent and experienced well wishers, trained legal mind/lawyer/law firm.
At times an elderly advice shall protect from situations, and at times at times elders and well wishers may advice to seek legal opinion. Retaining a lawyer is economical in the long run.