Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ssh -t user1@192.168.2.125 'sudo reboot'
- String cmd="ssh -t user1@192.168.2.125 'sudo reboot'";
- log.info("Executing command.."+cmd);
- p = Runtime.getRuntime().exec(cmd);
- //open error stream and input stream and process
- [2014-10-30 19:07:55,593] INFO Executing command..ssh -t user1@192.168.2.125 'sudo reboot'
- [2014-10-30 19:07:57,070] ERROR ERROR while executing command:
- ssh -t user1@192.168.2.125 'sudo reboot'
- [2014-10-30 19:07:57,070] ERROR Pseudo-terminal will not be allocated because stdin is not a terminal.
- bash: sudo reboot: command not found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement