illustration for Secure GitHub connections with SSH
pro

Secure GitHub connections with SSH

Instructor

Ryan Harris

9m closed-captioning
·
3 lessons
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
Star icon$$$
4.5
70
people completed
Published 5 years ago
|
Updated 5 years ago

SSH provides a secure way for your to connect to and authenticate with GitHub's servers. While HTTPS connections use usernames and passwords as credentials, SSH instead uses public and private key pairs. These can be generated on your system using a CLI like ssh-keygen and then associated with your GitHub account using the public key.

In some cases, you may need to connect to more than one GitHub account from the same system. For example, you may have separate accounts for personal and professional projects, which can be difficult to manage manually. Using ssh-agent and a SSH configuration file, you can alleviate this pain point by automatically determining which key to use based on your GitHub repository's git URL.