User Tools

Site Tools



HowTo Configure Public Key Auth in Windows 7

Rationale: typing your password again and again is boring, but saving it cleartext is insecure

  1. download and install TortoiseSVN
    • use 64 bit version if your Windows is 64 bit
  2. create a key pair
    • one key pair per user per client machine is fine
    • use PuTTYgen from PuTTY, no install necessary
    • SSH-2 RSA is fine
    • 2048 bit
    • click generate and provide some randomness
    • change Key comment to identify key later (e.g., on the svn server)
    • save private as *.ppk file and note its location
    • copy the complete textfield to a text editor and save it as *.pub file in the same location (for future reference)
  3. append the *.pub file to ~/.ssh/authorized_keys on the svn server
    • SSH Login to the SVN Server with Password
    • either open the file in an editor and copy/paste the content of the *.pub file
    • or upload the *.pub file with WinSCP and save it as authorized_keys (if this file already exists you have to append its content)
    • type public_id | plink.exe -pw username@hostname “umask 077; test -d .ssh || mkdir .ssh ; cat » .ssh/authorized_keys” might also work Source
    • take care that ~./ssh is in mode 700 and its files in mode 600
  4. secure the *.ppk file
    • e.g., NTFS encryption
  5. (optionally) test with PuTTY
  6. configure TortoiseSVN
    • Settings → Network → SSH client
    • C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe -i complete-path-to-file.ppk -l rind
  7. configure Eclipse
    • setup environment variable
      • Computer → Properties → Advanced → Environment Variables
      • SVN_SSH
      • C:\\Program Files\\TortoiseSVN\\bin\\TortoisePlink.exe -i complete-path-to-file.ppk -l rind
    • install Subclipse via Eclipse
    • use JavaHL (JNI) as SVN interface

Alternative: use PuTTY Pageant instead of the -i parameter

Further references:

HowTo Configure Public Key Auth in Linux / MacOS(?)

similiar like in Windows, but TortoiseSVN is not needed

ssh-copy-id makes it easy to append the public key on the server

Eclipse with Subclipse and JavaHL need no extra configuration

it/subversion.txt · Last modified: 2013/03/11 14:31 by Alexander Rind

alex @ ieg: home about me publications research