Secure shell keys setup

When your remote repository is a secure one, and you'd like Bibledit to use it, then is is necessary to set up secure shell keys. These keys allow easy access to the secure repository. Please follow the tutorial exactly.

Generate the keys

The first thing to do is to generate the keys.

On your Linux workstation, open a termial and enter the following:

cd
cd .ssh
ssh-keygen -t dsa -b 1024 -f bibledit-ssh-key

It will respond as follows:

Generating public/private dsa key pair.
Enter passphrase (empty for no passphrase):

At this stage press Enter. It will continue as follows:

Enter same passphrase again:

Press Enter again. It will continue as below:

Your identification has been saved in bibledit-ssh-key.
Your public key has been saved in bibledit-ssh-key.pub.

It will print some more lines of text. This is not relevant for our purpose.

This pair of keys is important. The pair is in the ".ssh" directory of your home directory. There is the private key, in a file called "bibledit-ssh-key", and the public key, in another file called "bibledit-ssh-key.pub". Store them safely.

Enter the keys

Open a personal account at sourceforge.net. Let's choose user name "repouser". Ask the project administrator whether he can add user "repouser" to the "repo2" project as a developer. Joining this project as a developer will give you the capability to write to the repository.

On your personal account page at sourceforge.net, choose Services, then choose "Edit SSH Keys for Shell/CVS". You have generated a file "bibledit-ssh-key.pub". Open it in gedit. Select all the text and copy it to the clipboard. In the screen titled "SSH Keys", there is a place where it says "Authorized keys:". Paste the text from gedit into that space on the web page. After checking that everything looks fine, press button "Update". Synchronizing the keys into the system has a 10 minute delay.

The next step is to tell the secure shell where to find the private key when we connect to sourceforge.net, and to set a few other important options. To do that, open file ~/.ssh/config in gedit. Enter the entry for sourceforge.net, like so:

Host *sourceforge.net
     IdentityFile ~/.ssh/bibledit-ssh-key
     BatchMode yes
     StrictHostKeyChecking no

Save the file.

The above refers to a file called "bibledit-ssh-key". You have generated this key before.

If the delay of 10 minutes has expired, we can now try whether the key pair works well. In the terminal, try to access the repository at sourceforge:

git ls-remote ssh://repouser@repo2.git.sourceforge.net/gitroot/repo2/repo2

If it works then it will give no errors, and list a few commits. If it does that, then the keys works well. If it asks for a password, or iIf there are errors, follow the tutorial again to get everything right.