
Copy the ssh key to the server’s git directory:Ĭlient$ scp ~/.ssh/id_rsa.pub on server:.See documentation on ssh-keygen for full details. This should create a file called id_rsa.pub in your ~/.ssh directory. While not strictly required, it’s a good idea to add a passcode to the key when prompted during key creation. Add a user to the server that will hold the git repositories.Make sure sshd is running/listed when you do a ps.

Server$ sudo apt-get install openssh-server


I found this setup handy when trying out some more complex git merging commands and experimenting with remotes while learning git. Here’s a complete guide that shows how to set up your own git server and git clients. This is sort of covered in other spots, but not as clearly and from scratch.
