Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. ssh -t user1@192.168.2.125 'sudo reboot'
  2.  
  3. String cmd="ssh -t user1@192.168.2.125 'sudo reboot'";
  4. log.info("Executing command.."+cmd);
  5. p = Runtime.getRuntime().exec(cmd);
  6. //open error stream and input stream and process
  7.  
  8. [2014-10-30 19:07:55,593] INFO Executing command..ssh -t user1@192.168.2.125 'sudo reboot'
  9. [2014-10-30 19:07:57,070] ERROR ERROR while executing command:
  10. ssh -t user1@192.168.2.125 'sudo reboot'
  11. [2014-10-30 19:07:57,070] ERROR Pseudo-terminal will not be allocated because stdin is not a terminal.
  12. bash: sudo reboot: command not found
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement