Multiple commands using JSch
问题 My requirement is as follow: I have to login to Unix box using my credentials and once login, I have to do sudo to different user. Once sudo is successful, I have to invoke shell in nohup. On completion of executions, close channel and session both. I tried the first step which is connect using sudo command, but I don't know how to invoke shell script after the sudo command. In the below code I am able to execute sudo command, but after getting sudo access how can I execute a shell in nohup