From the course: Git for System Administration

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Using SSH keys for authentication

Using SSH keys for authentication - Git Tutorial

From the course: Git for System Administration

Start my 1-month free trial

Using SSH keys for authentication

- [Instructor] In the previous video, we created a remote Git repository in rhhost2 and then created files on rhhost1 and pushed them up to it. This works very well, but every time we push the changes to it, we have to type in the Git users' password. Now what we want to do is use SSH keys for authentication. Once this is done, you can commit and push to the remote repository without being bothered with typing in a password. You will want to be on your Git client. I'm logged in to my rhhost1vm. To use SSH keys for authentication we need to create our key pairs on our client and then copy the public key to the Git server. On your client, type in SSH-keygen -t rsa -b 4096 -C , double quote and then your email address. Be sure to use your email address here. Also, if you plan on using these keys for GitHub, make sure the email addresses match. Now hit Enter. It will ask us the name of the file to save the keys as. You can take the default here. For the passphrase, leave it blank and hit…

Contents