This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
user:bkrishe3:portfolio:hpc0project1 [2014/04/22 16:28] – [Documentation] bkrishe3 | user:bkrishe3:portfolio:hpc0project1 [2014/04/22 17:24] (current) – [Documentation] bkrishe3 | ||
---|---|---|---|
Line 40: | Line 40: | ||
===VM-103=== | ===VM-103=== | ||
+ | * I did the exact same thing as VM-102 just changing $HOSTNAME from VM-102 to VM-103 | ||
+ | |||
+ | ===Scripting=== | ||
+ | * Im going to start at bkfirst so that will be my " | ||
+ | <cli> ssh-keygen </ | ||
+ | * You can run this as root or not, just remember where you did it | ||
+ | * At the starting point, after you run ssh-keygen, in .ssh folder under your user | ||
+ | * cp the .pub file to a different name named $FILE | ||
+ | * scp $FILE to both vms | ||
+ | * now append this file to authorized_keys on both vms | ||
+ | < | ||
+ | |||
+ | * Script itself isn't very long but it gets the job done | ||
+ | <cli> | ||
+ | #!/bin/bash | ||
+ | |||
+ | VM1=' | ||
+ | VM2=' | ||
+ | |||
+ | echo " | ||
+ | echo " | ||
+ | ssh root@$VM1 " | ||
+ | echo -e " | ||
+ | echo "Free Space" | ||
+ | ssh root@$VM1 "df -h | grep rootfs" | ||
+ | echo -e " | ||
+ | |||
+ | echo " | ||
+ | echo " | ||
+ | ssh root@$VM2 " | ||
+ | echo -e " | ||
+ | echo "Free Space" | ||
+ | ssh root@$VM2 "df -h | grep rootfs" | ||
+ | </ | ||