GitHub SSH Key Setup for Black Hat Python on Kali VM

๐Ÿ—“๏ธ Date: June 28, 2025
๐Ÿ“ Project: Black Hat Python
๐Ÿ’ป System: Kali Linux Virtual Machine


โœ… Purpose

To securely push and pull code from my private GitHub repository (black-hat-python) using SSH keys inside my Kali Linux VM. This setup eliminates the need for GitHub username/password authentication and supports safe command-line Git operations.


๐Ÿง  Summary of Steps

  1. SSH Key Generation:
    I generated a new ed25519 SSH key using ssh-keygen with the comment “ny2honolulu”. This created a public/private key pair at ~/.ssh/id_ed25519 and id_ed25519.pub.
  2. SSH Agent Activation:
    I launched the SSH agent using eval "$(ssh-agent -s)" and added my key with ssh-add ~/.ssh/id_ed25519.
  3. GitHub Authentication:
    I copied the contents of my public key and added it to GitHub under Settings โ†’ SSH and GPG Keys. GitHub accepted the key and confirmed successful authentication with:
    โ€œHi ny2honolulu! You’ve successfully authenticated, but GitHub does not provide shell access.โ€
  4. Repo Cloning:
    I cloned my private black-hat-python repository from GitHub to my Kali VM using the SSH URL. This lets me commit and push changes securely while following along with the Black Hat Python book.

๐Ÿ“ Notes

  • This setup is specific to my Kali Linux VM for learning from Black Hat Python.
  • GitHub no longer supports password login over HTTPS, so SSH is essential for private repo access.
  • Everything is now ready for secure Git operations from the Kali VM terminal.