SSH Key Generation Instructions

Blog Summary: (AI Summaries by Summarizes)
  • 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:

  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

The Difference Between Learning and Doing

Blog Summary: (AI Summaries by Summarizes)Learning options trading involves data and programming but is not as technical as data engineering or software engineering.Different types of

The Data Discovery Team

Blog Summary: (AI Summaries by Summarizes)Data discovery team plays a crucial role in searching for data in the IT landscape.Data discovery team must make data