Kali SSH Keys

ryan walker 6 Reputation points
2020-07-26T14:39:41.8+00:00

I have been creating a kali machine using azure for part of my final grade in university however I cannot seem to SSH into it whether it be using the cloud shell or even Putty. I have tried methods such as generating via Puttygen or via azure itself.
Any help would be greatfully appreciated!!

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,014 questions
{count} votes

2 answers

Sort by: Most helpful
  1. BhargaviAnnadevara-MSFT 5,466 Reputation points
    2020-07-29T21:08:25.783+00:00

    Hello @ryan walker ,

    Thanks for the additional details. The issue as I understand it from the screenshot you posted, is the SSH command used to get into the VM.

    It should be of the following format:
    ssh -i <path-to-private-key-file> <administrator-username>@<IP-address>

    For example:
    ssh -i .\Downloads\myKey1.pem azureuser@10.111.12.123

    I just created a Kali Linux VM on Azure in the UK South region providing Generate new key pair as the SSH key source option as follows:
    14422-ssh-source.png

    And downloaded the private key upon being prompted:
    14412-download-private-key.png

    Upon creation of the VM, I was able to login successfully using the SSH command in the mentioned format:
    14389-ssh.png

    The exact same details/steps are mentioned in this Quickstart as well: Create a Linux virtual machine in the Azure portal

    Please give it a try and let me know if you still see issues. Hope this helps!


  2. BhargaviAnnadevara-MSFT 5,466 Reputation points
    2020-08-10T18:26:13.317+00:00

    @ryan walker Sure, thanks for the response.

    Here is how you can connect to your VM using PuTTY:

    1. Generate the ppk file by loading the downloaded private key (in pem format) using PuTTYgen. 16779-puttygen.png
    2. Once you have saved the ppk file, please use PuTTY to connect to your VM as follows:
      Enter the VM IP under Session > Hostname; Navigate to Connection > SSH > Auth and load the generated ppk file for authentication; Click on Open. 16865-putty.png
    3. When prompted, enter the username (as entered while creating the VM). You should see something like this: 16846-session.png

    Please reach out in case of additional questions.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.