Advertisement
Guest User

Untitled

a guest
Apr 8th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #/bin/bash
  2. SSHPASS='user'
  3. SSHHOST='192.168.1.20'
  4. SSHUSER='user'
  5. ssh -t $SSHUSER@$SSHHOST << EOF
  6. echo "Changing Directoy to Cloud"
  7. cd /home/user/cloudit_2/it_cloud
  8. git status
  9. sleep 3
  10. touch /tmp/abc.txt
  11. ls -lah /tmp
  12. rm -rf /tmp/abc.txt
  13. sudo -S service ssh restart
  14. $SSHPASS
  15. EOF
  16.  
  17. <html>
  18. <h1>Deploy</h1>
  19. <form name="input" action="install.php">
  20. <input type="submit" value="Submit">
  21. </form>
  22. </html>
  23.  
  24. <?php
  25. $output = shell_exec("/bin/sh a.sh");
  26. echo "<pre>$output</pre>";
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement