| 1 | == Using a ssh key pair == |
| 2 | |
| 3 | |
| 4 | Sometimes it's irritating that you are always asked for your password while using SVN. Therefore, it can be useful to use a encrypted key-pair (public key+private key) to do the job for you. |
| 5 | |
| 6 | (1) Create the key pair by typing |
| 7 | |
| 8 | |
| 9 | {{{ |
| 10 | ssh-keygen -t dsa |
| 11 | }}} |
| 12 | |
| 13 | |
| 14 | Now you are prompted for a password for the private key. You can choose an empty password, which means that you can use your private key without a password. However, if somebody steals your private key, then he can do this too... |
| 15 | |
| 16 | If you decide to use a password, then you also have to follow point (3) below. |
| 17 | |
| 18 | |
| 19 | |
| 20 | (2) Copy the public key to the remote system, i.e. the subversion server: |
| 21 | |
| 22 | {{{ |
| 23 | ssh-copy-id -i ~/.ssh/id_dsa.pub user@remote-system |
| 24 | }}} |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | (3) If you have chosen a non-empty password: |
| 31 | |
| 32 | Type in your shell |
| 33 | |
| 34 | |
| 35 | {{{ |
| 36 | exec ssh-agent bash |
| 37 | }}} |
| 38 | |
| 39 | |
| 40 | and |
| 41 | |
| 42 | |
| 43 | {{{ |
| 44 | ssh-add |
| 45 | }}} |
| 46 | |
| 47 | |
| 48 | to start a ssh-key-agent. After doing this once, you can use the shell without password for the rest of its lifetime. |
| 49 | |
| 50 | |
| 51 | ---- |
| 52 | |
| 53 | see also [http://www.schlittermann.de/doc/ssh] |