Move to working-offline/

loren authored
revision 9791e78ce3b8ee42a70a6aeb4c09b49810faf507
Deleted file
# Generating SSH Keys

_Note: this guide is primarily for OSX. There will be slight variations for other platforms._

### Step 1: Check for SSH keys

First, check for existing ssh keys on your computer. Open up Terminal and run:

cd ~/.ssh
# Lists the files in your .ssh directory

Check to see if you have a file named either or If you don't have either of those files go to **step 2**. Otherwise, you already have an existing keypair, so you can skip to **step 3**.

### Step 2: Generate a new SSH key

To generate a new SSH key, enter the code below. When asked to enter a file in which to save the key, just press enter for default settings.

ssh-keygen -t rsa -C ""
# Creates a new ssh key, using the provided email as a label
# Generating public/private rsa key pair.
# Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
ssh-add id_rsa

Now you need to enter a passphrase. You should see something like this:

# Your identification has been saved in /Users/you/.ssh/id_rsa.
# Your public key has been saved in /Users/you/.ssh/
# The key fingerprint is:
# 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db

### Step 3: Add your SSH key to Penflip

Run the following code to copy the key to your clipboard (choose one corresponding to your operating system):

# Mac:
pbcopy < ~/.ssh/

# Windows:
clip < ~/.ssh/

# Linux:
sudo apt-get install xclip
# Downloads and installs xclip.

xclip -sel clip < ~/.ssh/
# Copies the contents of the file to your clipboard

Alternatively, using a text editor, you can open the ~/.ssh/ file and copy the contents of the file manually.

Note: it's important to copy the key exactly without adding newlines or whitespace. The `pbcopy` command makes it easy to perform this setup perfectly.

1. Go to your [Account](
2. Click [Advanced]( in the top navigation
3. Click [Add SSH key](
4. Paste your key into the "Key" field (title should be auto-generated)
5. Click "Add key"

That's it!

### Step 4: Test SSH

To make sure everything is working you'll now SSH to Penflip. Enter the following command:

ssh -T

You may see an RSA key fingerprint warning. Don't worry, this is supposed to happen.

If everything worked, you now have SSH access to Penflip! You can access your projects via the command line. For SSH access URLs, see 'Project Settings' > 'Advanced' from any of your projects.