How can I provide a SSH password to SVN on the command line?

Given that you're using SSH, the preferred way is to use a public key for authorization, which saves the need of a password completely.

A guide for creating and installing the keys can be found here.


svn co svn+ssh://username:[email protected]/home/svn/shproject


Infinitely better is to generate a keypair. As your local user:

$ ssh-keygen -t rsa

(accept all defaults)

Then take the contents of .ssh/id_rsa.pub and add it on the remote server to .ssh/authorized_keys Be very sure it is all pasted into the same line. Also be very sure the permissions of the .ssh directory are 600.

Then you should be able to ssh without being prompted for a password.