I am using EC2 and am new to the world of Linux, and I've looked for an answer to this but I think I'm just not sure how to ask the question correctly.
I have installed Jenkins and git using yum, under the account ec2-user, and they install fine. Yum created an account called jenkins which runs the Jenkins process (checked this using
ps -aux and the user is jenkins).
I have a remote git repository that uses public/private keys. When I
ssh-keygen, and then connect to my remote git repository through ec2-user, everything is fine. I'm just not certain how or where to create a key for the jenkins user.
This is where my trouble starts. When I
su jenkins and then
cd ~, I wind up in
~ec2-user. When I run
ssh-keygen as jenkins, it wants to put the key into
/home/ec2-user/.ssh/id_rsa - and that doesn't seem right.
How can I create a key pair for jenkins, or should I just have it added to the