Skip to content

Instantly share code, notes, and snippets.

@abhilash1in
Last active February 8, 2017 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhilash1in/63a5e4f7d38c8d01f3543fe5fe394863 to your computer and use it in GitHub Desktop.
Save abhilash1in/63a5e4f7d38c8d01f3543fe5fe394863 to your computer and use it in GitHub Desktop.
#!/bin/bash
USERNAME=sem6c
HOST="172.1.6."
SCRIPT="nohup sh -c \" echo aristotle | sudo -S add-apt-repository ppa:webupd8team/java -y && echo aristotle | sudo -S apt-get update && echo aristotle | sudo -S apt-get install oracle-java8-installer && echo aristotle | sudo -S apt-get install oracle-java8-set-default\" > /dev/null 2>&1 &"
for i in {40..255} ; do
sshpass -p"aristotle" ssh -o StrictHostKeyChecking=no ${USERNAME}@${HOST}$i "${SCRIPT}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment