I cannot run "sudo su" on my ec2 client , I ssh into the client through a java program and run the command through a program. I can run commands like "ls" and "ifconfig" though.
I get an error saying "sudo: sorry, you must have a tty to run sudo".
How can I run the command, I am using Jsch for ssh to my ec2 instance.