SSH Authentication is supported only if codeBeamer is running on Linux/Unix server.If port redirection is used for codebeamer, please check the value of CB_BASE_URL in scmloop/scm-ssh script.
Generating SSH keys
A keypair is only valid if it is a pair: your local operating system user needs access to both (in Unix/Linux enviroment: ~/.ssh directory). If you login to another local user, you must either:
Create a new keypair and provide the public key to codeBeamer (see below how) – this is the recommended method, as codeBeamer can handle multiple keys per account.
Move keypair files (private + public) from the previous user's ~/.ssh directory to the new user's directory. Check that the permissions are correct on the files and directory in this case: ~/.ssh directory must have "rwx------" access rights (octal 700) while key files (e.g. id_rsa, id_rsa.pub) must have "rw-------" access rights (only owner can read and write, octal 600). OpenSSH will not allow you to connect to the remote host if the permissions are not restrictive enough.
On the codeBeamer server in /etc/ssh/sshd_config either all operating system accounts or at least the account used for SSH operations must be allowed as below:
AllowUsers must contain all operating system accounts allowed to login via SSH.
You can now generate your keys for your operating system user and associate them with your codeBeamer account.
Linux and Mac OS X
Open a terminal window on your desktop machine
Type the following commands: use your own user ID and accept the default options.
Generating public/private rsa key pair.
Enter file in which to save the key (/home/zk/.ssh/id_rsa):
Created directory '/home/zk/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/zk/.ssh/id_rsa.
Your public key has been saved in /home/zk/.ssh/id_rsa.pub.
The key fingerprint is:
The key's randomart image is:
+--[ RSA 2048]----+
| o |
| o * |
| S . |
| EB o |
| =.B.+ |
| . B+* . |
| ..=.. |
Finally run the following command:
and copy the output. This is your public key.
On Windows, Git (http://msysgit.github.io/) comes with a tool called Git Bash. You can access this trhough Start > Programs > Git. Using this tool you can generate the keys following the same steps as for Linux.
On Windows SSH keys can be generated using PuTTYGen (the download link can be found on the PuTTY Download Page. If you're using Mercurial also download ptlink from this page.
Start PuTTYGen, generate the key (Generate button) and save the private key to a file (Save private key button) like 'key.ppk' under your home directory. Copy the content of Public key for pasting into OpenSSH authorized_keys file textbox (this is your public key).
Figure: Generate SSH Key with PuttyGen You must login to see this link. Register now, if you have no user account yet.
For Mercurial you have to edit the .hgrc file in your home directory. Add the following lines (if the file doesn't exist just create it):
This will add the host key of codeBeamer to the known hosts.
Associating Your SSH key with Your codeBeamer Account
You can associate your generated public key with your codeBeamer account using the following steps:
Return to your codeBeamer window
Log in again or just select the My Start tab
Now select the Account Info tab
Select the Edit Public SSH Keys link
Upload or copy-paste the public key from the terminal (linux) or from PuTTYGen (Windows) into the boxes and save it.
Setting up a custom private-key
If you want to use the custom private-key - something other than .ssh/id_rsa- and you want to use this with codeBeamer and your git cloning or authentication fails then you may have to set-up git to use this custom private key. There are several ways to do this, see How to tell git which private key to use.