pry0cc / axiom

The dynamic infrastructure framework for everybody! Distribute the workload of many different scanning tools with ease, including nmap, ffuf, masscan, nuclei, meg and many more!
MIT License
4k stars 622 forks source link

second install of axiom for same account behavior #702

Closed molitona closed 1 year ago

molitona commented 1 year ago

I installed axiom on my vps1 (controller) and using digitalocean as cloud provider. Then my vps expired and I switched to my new vps2:

For digitalocean case, when installing axiom on vps2 with same azure account and subsription. will it detect the base snapchot on images made when installing axiom on vps1 and build vms from it, or it will do all the things from 0 ?


I installed axiom on my vps1 (controller) and using azure as cloud provider. Then my vps expired and I switched to my new vps2:

For azure case, when installing axiom on vps2 with same azure account and subsription. what will happen exactly ?

0xtavian commented 1 year ago

@molitona

will it detect the base snapchot on images made when installing axiom on vps1 and build vms from it, or it will do all the things from 0 ?

Using vps2 you should be able to list all images with axiom-images ls. You will see your azure snapshot created by vps1. You can select the image by name, axiom-images set axiom-$provisioner-$timestamp. You can spin up and delete instances (axiom-init,axiom-fleet,axiom-rm).

However, the image you built with vps1 created a unique SSH key located in ~/.ssh/axiom_rsa and ~/.ssh/axiom_rsa.pub. vps1's public key was added to the image's /home/op/.ssh/authorized_keys file during the axiom-build process done by vps1.

Meaning, unless you have your SSH private key from vps1 used for the initial axiom-image build, you wont be able to ssh into the instances with vps2

what will happen exactly

If you install axiom via the normal process on vps2, axiom-configure will kick off axiom-account-setup and thenaxiom-build. So you will build another image, which you will be able to use since vps2 will create its own set of SSH keys and add the public key to the new images' /home/op/.ssh/authorized_keys file during the axiom-build processes.

You can switch the SSH key axiom uses by editing the ~/.axiom/axiom.json file (which is just a symbolic link a account.json file in ls ~/.axiom/accounts/). https://github.com/pry0cc/axiom/wiki/A-Quickstart-Guide#ensure-your-build-has-occurred-successfully

molitona commented 1 year ago

thankss :))