Home > Linux, SVN > How to make SVN remember password

How to make SVN remember password

Who is this post for?

This post is for anyone who wants a step by step guide to accomplish any of the following

  1. Make a SVN client like tortoise svn remember password
  2. Make linux server remember your password when logging through putty

Tools you need:

  • Putty
  • Puttygen

What you need to do:

  1. Using putty – login to linux server. change directory to ~/.ssh/ by typing following command
    cd ~/.ssh
  2. Type command
    ssh-keygen -b 1024 -t dsa 

    and press enter. Do not enter a passphrase. Hit enter when prompted for one. Same for the filename. default filename = id_dsa and id_dsa.pub. id_dsa is the private key file and id_dsa.pub is the public key file.

  3. type command
    cat ~/.ssh/id_dsa.pub

    Copy the output to the clipboard by selecting the output by mouse.

  4. Type command
    vi ~/.ssh/authorized_keys

    Hit i to enter Insert mode and then paste your public key (if there is already a key in this file, move to the bottom before pasting). Hit the ESC key to leave Insert mode and type :wq and hit enter to save and exit vi editor.

  5. Using ftp download your key files – both private and public
  6. In order to use the private key we get from the server, we have to convert it to a putty format. This is because the private key file format is not specified by some standard body. We can accomplish this using puttygen. Open Puttygen
  7. In the tree structure on left, choose conversion -> import key -> choose the private key file downloaded from ftp
  8. Choose to save private key. Choose path and save the file as anything.ppk
  9. Run Putty. Specify parameters
    • Session->HostName: Hostname or IP Adress of your server
    • Session->Protocol: SSH
    • Session->Saved Sessions: MyConnection
    • SSH->Prefered SSH Protocol version: 2
    • SSH->Auth->Private Key file for auth: $PATH$mykey.PKK (replace $PATH$ with real path to the mykey.PKK file)
  10. Go back to Session tab and hit “save” button. You will see “MyConnection” in the list of available connections.
  11. Next click “open” and you should see a telnet login prompt. Use “myuser” as username (without double quotes of course) and if everything is OK, you don’t have to provide a password to your system. If the system still requires a password, something went wrong.
  12. Now that linux server and putty manage to remember your password, you need an application client to use it. In this case it is SVN client e.g. tortoise svn. Go to TortoiseSVN->RepoBrowser and specify a URL like this:
    svn+ssh://myuser@MyConnection/usr/local/repos

    …where MyConnection is the putty session name and /usr/local/repos is my svn repository on linux server

And you are done …

Related posts

Advertisement
Categories: Linux, SVN
  1. January 18, 2009 at 12:23 pm | #1

    Thanks J.

    I think it’d better to use host name as name for the saved putty session (use ‘server.myhost.com’ instead of ‘MyConnection’). That way you won’t have to edit repository address (and subsequently saved of relocating the repository in case trouble arises).

    Very helpful article.

  2. Pete
    July 10, 2010 at 1:36 am | #2

    A nice workaround, but seriously, why is this so complicated with TortoiseSVN? I should not need to spend an hour, and require the indefinite use of Putty, just to have Tortoise save two strings of text!

  3. Stalser
    October 5, 2010 at 10:38 pm | #3

    Thanks! Автор, убейся об стену!

  4. J. D. Uhls
    November 23, 2010 at 3:24 am | #4

    Thanks! Helped alot! I agree w/ Pete.

  5. Ralph
    March 15, 2011 at 10:50 am | #5

    Well, you can merge step 3 and 4 to only one command:

    cat ~/.ssh/id_dsa.pub > ~/.ssh/authorized_keys

    It’s lesser complicated and there’s no need for vi.

  6. Dash
    April 17, 2011 at 8:42 am | #7

    Ralph — better make that:

    cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

    Otherwise any authorized keys you have in place already will disappear (> overwrites, >> appends)

    • April 18, 2011 at 5:13 am | #8

      Dash .. You are very correct there. Both your’s and Ralph’s suggestion is valuable. Thanks

  7. Tomi
    July 28, 2011 at 7:21 pm | #9

    Thanks, this was helpful! I was googling how to stop Tortoise SVN from asking username and password every time and found this article.

  1. January 30, 2011 at 6:23 am | #1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.