- SSH keys can be created to allow for SSH or checkouts/commits without password prompts
- Key generation should be done on the newest possible SSH version to avoid weak keys generated by older versions
- To create a key on a Linux/Mac box:
- To create a key on Windows:
- If there are still issues logging in or getting a key not accepted on Linux:
If you are using SSH and especially Subversion over SSH, here are some instructions for creating SSH keys. These keys will allow you SSH or do checkouts/commits with having password prompts.
Note: The key generation should be done on the newest possible SSH version. There are weak keys generated by older versions of SSH. These key will get mysteriously rejected by newer versions.
SSH or login to a Linux/Mac box. If the .ssh directory does not exist follow these instructions:
- mkdir ~/.ssh
- chmod 700 ~/.ssh
Here are the steps to create a key.
- Generate the key. Remember not to give a password or you will continue to be prompted for a password:
jesse.anderson@devsvn:~/.ssh$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/jesse.anderson/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/jesse.anderson/.ssh/id_rsa.
Your public key has been saved in /home/jesse.anderson/.ssh/id_rsa.pub.
The key fingerprint is:
- Copy id_rsa* to any other computers “~/.ssh” folder
Instructions for Windows:
- Download and install Putty.
- Copy id_rsa* to C:\Document and Settings\*USERNAME*\.ssh
- Start putty key gen.
- Load id_rsa from C:\Document and Settings\*USERNAME*\.ssh
- Click on “Save Private Key” and save to C:\Document and Settings\*USERNAME*\.ssh. Save the file as id_rsa.ppk.
- Start Putty.
- Give a hostname.
- Go to Connection->SSH->Auth.
- Under “Private key file for authentication” click browse.
- Go to C:\Document and Settings\*USERNAME*\.ssh and choose id_rsa.ppk.
- Go to Session.
- Click on Save.
If you still can’t login or get a key not accepted on Linux:
- cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
- chmod 600 ~/.ssh/authorized_keys