Deploying a Git server in a AWS linux instance
Posted
by
Leroux
on Server Fault
See other posts from Server Fault
or by Leroux
Published on 2012-04-06T02:22:18Z
Indexed on
2012/04/06
5:32 UTC
Read the original article
Hit count: 542
I'm making a git server on my linux instance in AWS. I tried doing it using these instructions but in the end I always get stuck with a "Permission denied (publickey)" message. So here is my detailed steps, the client is my windows machine running mysysgit and the server is the AWS ubuntu instance :
1) I created user Git with a simple password.
2) Created the ssh directory in ~/.ssh
3) On the client I created ssh keys using ssh-keygen -t rsa -b 1024, they got dropped in my /Users/[Name]/.ssh directory, id_rsa and id_rsa.pub key pair was created.
4) Using notepad I copy pasted the text into newly created files on the server in the ~/.ssh directory of my Git user. ~/.ssh/id_rsa and **~/.ssh/id_rsa.pub** were copied.
5) On the server I made the authorized_hosts file using "cat id_rsa.pub >> authorized_hosts" (while inside the .ssh directory)
6) Now to test it, on my client machine I did ssh -v git@[ip.address]
7) Result :
debug1: Host 'ip.address' is known and matches the RSA host key.
debug1: Found key in /c/Users/[Name]/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/[Name]/.ssh/identity
debug1: Trying private key: /c/Users/[Name]/.ssh/id_rsa
debug1: Offering public key: /c/Users/[Name]/.ssh/id_dsa
debug1: Authentications that can continue: publickey
debug1: No more authentication methods to try.
Permission denied (publickey).
I would appreciate any insight anyone can give me.
© Server Fault or respective owner