Skip to content

General Documentation Page

Generate SSH Public & Private Keys for GitHub Actions Workflows

Section titled “Generate SSH Public & Private Keys for GitHub Actions Workflows”

To generate a new SSH key pair, run this on Local PC with OpenSSL installed:

Terminal window
ssh-keygen -t ed25519 -f id_ed25519
  • This will create id_ed25519 (private key) and id_ed25519.pub (public key) in your current directory.

Store the Private Key as a GitHub Actions Secret

Section titled “Store the Private Key as a GitHub Actions Secret”
  • Copy the entire contents of your id_ed25519.pub file.
  • On your droplet, append it to /root/.ssh/authorized_keys:
Terminal window
cat id_ed25519.pub >> /root/.ssh/authorized_keys

This setup allows GitHub Actions to connect securely to your server using SSH keys.