I have been working on Kali Linux for some time and I wished to start using Azure CLI to start my Azure pen-testing learning.
Guess what the maximum trouble happens when you wish to get started and things don't align well with your needs and expectations. This results in wasting a lot of time just getting setup and getting started. For a start Azure doesn’t have CLI package for Kali rolling distribution.
And the steps listed above dont work if you simply cut-paste-run in your Kali VM. And there is also the fact that “ apt
changed the way it verified signatures. And MS has not updated the process for Debian 12.”, quoting it verbatim from the link below.
Now I enjoy staying at the cutting edge and keep my Kali updated. Kali Linux Rolling is derived from Debian testing “Trixie”. And I needed to get my Azure CLI working in this. So long story short, this is how I did it.
Step 1. Get Microsoft’s public key and save it in the location /usr/share/keyrings and importantly definitely not in /etc/apt/keyrings.
Step 2. Paste the below in sources.list. Notice I used bookworm which is the latest Debian stable distro.
Step 3. Update and install as usual.