User Tools

Site Tools


user:bkrishe3:portfolio:hpc0project1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
user:bkrishe3:portfolio:hpc0project1 [2014/04/22 16:28] – [Documentation] bkrishe3user: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 "Starting Point"
 +<cli> ssh-keygen </cli>
 +  * 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
 +<cli>root@vm-###:~/.ssh# cat $FILE >> authorized_keys </cli>
 +
 +  * Script itself isn't very long but it gets the job done
 +<cli>
 +#!/bin/bash
 +
 +VM1='vm-102.projects.lan'
 +VM2='vm-103.projects.lan'
 +
 +echo "VM-102"
 +echo "Uptime"
 +ssh root@$VM1 "uptime"
 +echo -e "\n"
 +echo "Free Space"
 +ssh root@$VM1 "df -h | grep rootfs"
 +echo -e "\n"
 +
 +echo "VM-103"
 +echo "Uptime"
 +ssh root@$VM2 "uptime"
 +echo -e "\n"
 +echo "Free Space"
 +ssh root@$VM2 "df -h | grep rootfs"
 +</cli>
  
user/bkrishe3/portfolio/hpc0project1.1398184089.txt.gz · Last modified: 2014/04/22 16:28 by bkrishe3