this code set to button click and once click the buttin it prompt console and I cannot do any thing.

how should i solve this problem

Actually i need to run few commands from back end , like first one to login using saved session in putty , and then su command to change substitute user then cd to go to a directory and from there run some commands define in that server