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
4.06k stars 645 forks source link

axiom-configure gets dialog prompt if OpenSSH is already installed on Debian #660

Open rl1987 opened 1 year ago

rl1987 commented 1 year ago

There's this line in axiom-configure script:

        DEBIAN_FRONTEND=noninteractive sudo apt-get update && sudo apt-get install git ruby python3-pip curl iputils-ping net-tools unzip xsltproc bc rsync sudo wget nano bsdmainutils openssh-server fail2ban -y 

If OpenSSH is already installed, installing openssh-server via APT may present a dialog asking the user if they want to keep the existing configuration or not. This is a show-stopper for unattended, automated installations in Debian-ish server environment, such as Digital Ocean instances.

0xtavian commented 1 year ago

@rl1987 Interesting, what OS are you using with DO? Can you try with Ubuntu 20.04?

rl1987 commented 1 year ago

Debian 11. The command in provisioning script that would be executed via cloud-init is:

printf "\n1\nn\ndo\ny\n$(cat do_token.txt)\nsfo3\n\n\n\n\nquest\nbarebones\n\n\n" | ./axiom-configure

I'll try experimenting some more to isolate the issue better.

rl1987 commented 1 year ago

Not getting the prompt on Ubuntu 20.04.

rl1987 commented 9 months ago

Tried this again and the problem resurfaced.

rl1987 commented 9 months ago

My attempt to fix this: https://github.com/pry0cc/axiom/pull/779