CSE 365
← Reference docs

Generating an SSH Keypair

Linux / macOS

  1. Open a terminal.

  2. Generate the key:

    ssh-keygen -t ed25519 -f key -P ''
    

Your keys:

  • Private key: ./key — never share this.
  • Public key: ./key.pub — safe to share.

Print the public key to copy it:

cat ~/.ssh/id_ed25519.pub

Windows

Use PowerShell

  1. Open PowerShell.

  2. Generate the key:

    ssh-keygen -t ed25519 -f key -P ''
    

Print the public key to copy it: powershell type ./key