🔐 SSH Key Generation Guide - n0one42/ansible-homelab GitHub Wiki
This section provides a step-by-step guide on generating SSH keys. SSH keys are essential for secure communication and authentication between your control node and the Proxmox servers and VMs.
- A terminal application (Linux, macOS, or Windows with a compatible terminal emulator)
- Basic understanding of terminal commands
- Open a terminal on your local machine.
- Run the following command to generate a new SSH key pair:
ssh-keygen -o -a 100 -t ed25519 -C "HomeLab" -f ~/.ssh/id_ed25519
-
When prompted, you can enter a secure passphrase. However, for demonstration purposes and based on our security requirements, we’ll leave the passphrase empty. Simply press
Enter
to skip the passphrase. -
Your SSH keys will be generated in the location
~/.ssh/id_ed25519
and~/.ssh/id_ed25519.pub
.
🪟 Windows (W.I.P)
🍏 MacOS (W.I.P)
🐧 Arch Linux
-
YubiKey with FIDO2 support
-
Packages
-
sudo pacman -S libfido2
-
-
Plug in your YubiKey.
-
Generate a new SSH key:
ssh-keygen -t ecdsa-sk -O resident # Alternative (but recommended) ssh-keygen -t ecdsa-sk -O resident -O application=ssh:HomeLab -C "HomeLab"
-
Follow the prompts to touch your YubiKey and optionally set a passphrase.
After generating the SSH keys, you can verify their existence by listing the files in the .ssh
directory:
ls -l ~/.ssh/id_*
You should see the following output (or similar):
-rw------- 1 user user 411 Dec 1 12:34 /home/user/.ssh/id_ed25519
-rw-r--r-- 1 user user 101 Dec 1 12:34 /home/user/.ssh/id_ed25519.pub
This confirms that your SSH keys have been generated and are ready for use.
For more detailed information on using SSH keys with your Proxmox setup, refer to the Setup Guide.