Created
May 23, 2016 19:26
-
-
Save elarif/02bd2778271c4dd5bd22afe9194f5fc1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start multiple virtualbox vm headless | |
for i in vm1 vm2 vm3 ; do VBoxManage startvm $i --type headless; done | |
# get ip address for multiple vm | |
# TODO put them in an array | |
for i in vm1 vm2 vm3 ; do VBoxManage guestproperty get $i "/VirtualBox/GuestInfo/Net/0/V4/IP"; done | |
# copy ssh key to multiple vm | |
for i in vm1 vm2 vm3 ; ; do ssh-copy-id -i ~/.ssh/id_rsa.pub root@$i; done | |
# remove ip from known_hosts | |
# TODO read it from array | |
for i in 10 11 12 13 14; do ssh-keygen -R 192.168.1.$i: done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment