Generate a PuTTY Public-Private Key Pair on Windows (Windows)
1. Open PuTTYgen
Launch the PuTTYgen application. You can find it in your PuTTY installation directory.
Generating a Public Private key pair using PuTTYgen
2. Choose Key Type
Select the type of key you want to generate. Choose Ed25519 or EdDSA from the "Type of key to generate" list.
3. Generate the Key
Click the "Generate" button. As prompted, move your mouse randomly over the blank area to generate randomness for the key.
4. Set Passphrase
Enter a strong passphrase in the "Key passphrase" and "Confirm passphrase" fields. A passphrase adds an extra layer of security, as it's required to use the private key.
5. Save the Keys
Click "Save private key" to save the private key in the .ppk format (PuTTY Private Key), which is PuTTY's native format.
Next, save the public key by copying the text from the "Public key for pasting into authorized_keys file" field and saving it in a text file with a .pub extension. You can also click "Save public key" to save the public key in a format that some other tools might recognize, but the best way is to copy the text in the top window.
6. Log into termcast.computing.dcu.ie and copy YOUR public key to your student.computing.dcu.ie account.
- Copy all the output from ssh-ed25519 public key, and add it to the next command.
- NOTE: Do not delete any existing entries in the ~/.ssh/authorized_keys file
- Now go to termcast.computing.dcu.ie where you can install the keys with the following command
echo "INSERT YOUR PUBLIC KEY HERE" | tee -a ~/.ssh/authorized_keys
For Example[this is my key]:
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTEDDEEDIODGjcvqJ+0YNInUpNz3UrI5PovlfaX08XhZ/mrRkEop your_email@dcu.ie" | tee -a ~/.ssh/authorized_keys
7. Log in via SSH
Try logging in to the server using SSH:
ssh username@student.computing.dcu.ie
Replace "username" with your actual username.
8. YouTube video example
For a visual guide, you can watch this video tutorial on YouTube.