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:

  1. mkdir ~/.ssh
  2. chmod 700 ~/.ssh

Here are the steps to create a key.

  1. 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:
    xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
  2. Copy id_rsa* to any other computers “~/.ssh” folder

Instructions for Windows:

  1. Download and install Putty.
  2. Copy id_rsa* to C:\Document and Settings\*USERNAME*\.ssh
  3. Start putty key gen.
  4. Load id_rsa from C:\Document and Settings\*USERNAME*\.ssh
  5. Click on “Save Private Key” and save to C:\Document and Settings\*USERNAME*\.ssh. Save the file as id_rsa.ppk.
  6. Start Putty.
  7. Give a hostname.
  8. Go to Connection->SSH->Auth.
  9. Under “Private key file for authentication” click browse.
  10. Go to C:\Document and Settings\*USERNAME*\.ssh and choose id_rsa.ppk.
  11. Go to Session.
  12. Click on Save.

If you still can’t login or get a key not accepted on Linux:

  1. cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
  2. chmod 600 ~/.ssh/authorized_keys
RELATED POSTS:  Creating Work Queues with Apache Kafka and Apache Pulsar
Share This