Generating an SSH key pair on Mac OS

  1. Open the Terminal application. You can find it using Spotlight Search (Cmd + Space) or by navigating to Applications > Utilities > Terminal.
  2. Run the following command to create a 4096-bit RSA key:
$ ssh-keygen -b 4096 -t rsa
Click to copy

 3. When prompted to enter a file name, do not use the default (id_rsa). Instead, enter your CSUF campus Login ID (same login/username as your CSUF campus portal) and the current date in this format: <your-login-ID>-yyyymmdd

Example:
If your CSUF CSUF campus Login ID is student1 and today is June 13, 2025, enter:

student1-20250613
Click to copy

 4. When asked for a passphrase, simply press Enter to skip. You’ll then see a confirmation message and a unique "randomart" image representing your key.

 5. Your SSH key files are saved in the hidden .ssh directory in your home folder.
 To see them, run:

 $ ls -la ~/.ssh/
Click to copy

 6. You should see two files:

student1-20250613 (your private key)
student1-20250613.pub (your public key)

 7. To view the content of your public key (the one you’ll share), replace <your_file_name> with the one you chose in step 3 and run:

$ cat ~/.ssh/<your_file_name>.pub
Click to copy

 8. To make it easier to upload or submit, copy the public key to your Desktop using:

 cp ~/.ssh/<your_file_name>.pub ~/Desktop/<your_file_name>.pub
Click to copy

    This .pub file contains the public key that you can share with instructors, system administrators, or remote systems.

You do not need to share the private key, only the public key is meant to be shared or uploaded to servers.