Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Set up key based ssh authentication

trevormarshall edited this page Jun 9, 2011 · 4 revisions

Go back to release your project

Get access

You will first need an SSH account on the host in question. Contact sysadmin at springsource dot com for this. Once you have an account you'll be able to log in via LDAP credentials. Test this out.

Generate a key

  1. Run ssh-keygen on your machine. Hit enter when asked for a passphrase.
  2. You should now have two files: ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub

Note: going with an empty passphrase is not the most secure option. See Github's own documentation on the matter for more information on using a passphrase and using ssh-agent to avoid having to enter the passphrase on each authentication.

Install as an authorized key on the remote host

  1. Copy the contents of the .pub file
  2. ssh into static.springframework.org
  3. Edit (or create if necessary) the file ~/.ssh/authorized_keys
  4. Paste the contents of the .pub file within
  5. Ensure that the file and the .ssh dir are readable and writable only by owner. chmod 700 ~/.ssh ; chmod 600 ~/.ssh/authorized_keys if necessary.
  6. Log out
  7. Log back in. You should not be prompted for a password.

If passwordless authentication does not work as detailed above, try using ssh -v when logging in. It will give you details about the handshake and you can see where things are going wrong. It's usually file permissioning problems in the .ssh directories.


Go back to release your project