Cheatsheet for Passwordless SSH Access to SourceForge for EPICS V4 Development

These instructions were written for programmers of the epics-pvdata sourceForge project, but are probably general to any sourceForge project.

They're based on reference instructions at SourceForge. Also, they're written for Mac OS X command line, but any unix is probably the same, so for "mac" read, your local machine.

  1. On your mac in your user account, execute ssh-keygen and follow the prompts. You want a the file ~/.ssh/id_dsa.pub when you've finished (see the instructions at SourceForge).

    % ssh-keygen -t dsa -C "your_sourceforge_userid@shell.sf.net"
  2. Install your key into your sourceforge account:

    1. If you can, use ssh itself (see below if this doesn't work for you):

      % ssh -i /Users/greg/.ssh/id_dsa.pub your_sourceforge_userid@epics-pvdata.hg.sourceforge.net
      your_sourceforge_userid@epics-pvdata.hg.sourceforge.net's password: ******
      Welcome to *.hg.sourceforge.net
      This is a restricted Shell Account
      You cannot execute anything here.
      Connection to epics-pvdata.hg.sourceforge.net closed.
      
    2. Or, if that above doesn't work, use the manual mechanism given on your Sourceforge Account Services page. Copy and paste the contents of your ~/.ssh/id_dsa.pub file, as created by ssh-keygen above, into the window provided in your account services page as described in "SSH Key Posting" off the reference instructions at SourceForge.

  3. Update your ssh config file to specify that for the epics-pvdata sourceforge site at least, to use passwordless authentication. That is, add the following lines to your own ~/.ssh/config file:

    Host epics-pvdata.hg.sourceforge.net
    PreferredAuthentications publickey
    IdentityFile /Users/<your computer username>/.ssh/id_dsa     <==edit
    User <your sourceforge username>      <== edit
    
  4. Test it. hg pull should work without a password

Greg White, SLAC, PSI
Last modified: Sun Dec 11 17:49:22 PST 2011