Skip to main content

Generate an SSH key pair

How to create the OpenSSH key pair that authenticates your SFTP connection to CollegeVine, on macOS, Linux or Windows.

Every SFTP connection to CollegeVine is authenticated with an OpenSSH key pair. You generate the pair yourself, paste the public key into CollegeVine, and keep the private key in your CRM or middleware.

What a key pair is. A key pair authenticates and secures the connection between your CRM and CollegeVine. Access to your SFTP folder requires the correct username, private key, public key, and an allowed IP address, which makes it considerably more secure than a username and password.

Key requirements

  • Format: OpenSSH, not "New OpenSSH"

  • Key type: RSA

  • Size: 2048 bits or more

  • Passphrase: none

Slate is strict about all four and will reject a key that misses any of them. Other CRMs are usually more forgiving, but a key that meets these four requirements works everywhere.

Pick one of the three methods below and open it. The command line is fastest and needs no download on current operating systems. PuTTYgen is a visual alternative for Windows.

Command line: macOS and Linux

1. Open Terminal. On a Mac you can find it with Spotlight (Command + Space) or under Applications > Utilities. Make sure the .ssh directory exists:

mkdir -p ~/.ssh

2. Generate the key pair:

ssh-keygen -t rsa -b 4096 -m PEM -f ~/.ssh/collegevine -N ""

This writes two files: collegevine.pub is your public key, collegevine is your private key.

3. Print the public key. This is the value you paste into CollegeVine:

cat ~/.ssh/collegevine.pub

On macOS you can copy it straight to the clipboard instead:

pbcopy < ~/.ssh/collegevine.pub

4. Print the private key when your CRM or middleware asks for it:

cat ~/.ssh/collegevine

Command line: Windows (PowerShell)

Windows 10 version 1809 and later, and Windows 11, include the OpenSSH client. Nothing to download.

1. Open PowerShell and confirm the tool is available:

Get-Command ssh-keygen

If that returns nothing, add it from Settings > System > Optional features > Add an optional feature > OpenSSH Client, or run this in an administrator PowerShell window:

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

2. Create the .ssh folder if it does not already exist:

New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\.ssh"

3. Generate the key pair. When prompted for a passphrase, press Enter twice to leave it empty:

ssh-keygen -t rsa -b 4096 -m PEM -f "$env:USERPROFILE\.ssh\collegevine"

If you would rather run one command with no prompts, note that PowerShell does not pass an empty -N "" through correctly. Quote it as -N '""':

ssh-keygen -t rsa -b 4096 -m PEM -f "$env:USERPROFILE\.ssh\collegevine" -N '""'

4. Print the public key. This is the value you paste into CollegeVine:

Get-Content "$env:USERPROFILE\.ssh\collegevine.pub"

Or copy it straight to the clipboard:

Get-Content "$env:USERPROFILE\.ssh\collegevine.pub" | Set-Clipboard

5. Print the private key when your CRM or middleware asks for it:

Get-Content "$env:USERPROFILE\.ssh\collegevine"

PuTTYgen: a visual alternative for Windows

Use this if you prefer a visual tool, or if your machine does not have the OpenSSH client.

1. Download PuTTYgen from the PuTTY download page. Most machines need the 64-bit x86 MSI installer. To check whether your machine is 32- or 64-bit, go to Start > Settings > System > About and look at System type.

The PuTTY download page, showing the MSI installer options for 64-bit x86, 64-bit Arm, and 32-bit x86

The release number on that page changes over time. Take whatever the current stable release is.

2. Run the installer and accept the default options.

3. Open PuTTYgen, not PuTTY. Search Windows for puttygen.

Windows search results with the PuTTYgen app listed as the best match

4. Check that Type of key to generate is RSA and Number of bits in a generated key is 2048 or higher. These are usually the defaults.

The empty PuTTY Key Generator window with RSA selected and 2048 bits set

5. Click Generate, then move your mouse over the blank area until the green bar fills. PuTTYgen uses the mouse movement as randomness, and the buttons stay greyed out until it finishes.

The green progress bar that fills as you move the mouse to generate randomness

6. Leave Key passphrase and Confirm passphrase empty.

The generated key shown in PuTTYgen with both passphrase fields left empty

7. Copy the public key from the top box, starting at ssh-rsa and continuing to the very end of the key. This is the value you paste into CollegeVine.

The public key text highlighted in the top box, selected from ssh-rsa through to the end of the key

Two things to avoid here: do not copy the Key fingerprint line by mistake, and do not stop short of the end of the key. The rsa-key- value further down is PuTTYgen's key comment, not the start of your key.

8. Save the private key in the right format: go to Conversions > Export OpenSSH key. Do not choose "Export OpenSSH key (force new file format)", which produces the format Slate rejects, and do not use the Save private key button, which writes PuTTY's own .ppk format instead.

The PuTTYgen Conversions menu open, showing Export OpenSSH key directly above Export OpenSSH key force new file format

9. PuTTYgen warns that you are saving without a passphrase. That is expected here. Click Yes.

The PuTTYgen warning dialog asking you to confirm saving the key without a passphrase

10. Open the saved private key file in a plain text editor such as Notepad to copy its contents. Do not open it in Word or a PDF reader.

Check you got it right

The public key is a single line beginning ssh-rsa. The private key begins -----BEGIN RSA PRIVATE KEY-----.

If you used the command line, do not drop -m PEM. It is what produces the format CollegeVine and Slate require. Without it, ssh-keygen writes -----BEGIN OPENSSH PRIVATE KEY-----, which is the "New OpenSSH" format Slate rejects.

Keep the private key private. Paste the public key into CollegeVine. The private key goes only into your CRM or middleware. Do not send it to CollegeVine and do not paste it into a support ticket.

Where the public key goes

Paste the public key into the SSH public key field when you set up your integration, alongside the source IP addresses that will connect. The guide for your setup covers that step:

Did this answer your question?