본문 바로가기

Computer Vision

[Github] Register SSH key / SSH 키 등록하기

(1) Register SSH key

Author : @최규원

Update: 2021.05.10


Create a new SSH key on your local PC

Register a SSH key is necessary to access Git via your local terminal.

This tutorial will show how to create a ssh key and register it on github.

 

  1. First, you have to check whether ssh key is already existed.
  2. Follow the commands below to check ssh key existence.
$ cd ./ssh
$ ls

 

If you haven't made any, it will say 'No such file or directory' and command '$ ls' shows that there's no directory for ssh.

 

 

  1. Create a new SSH key
$ ssh-keygen -t rsa -C "your_id@your_email_host.com"

 

⚠️You have write your email address that is used when you create your github account!!⚠️

  1. Just put ENTER when it asks passphrase! Not to set password is way easier to use~
  • I put blank (ENTER) for password!

 

 

728x90

 

Check your SSH key

 

$ cat ~/.ssh/id_rsa.pub

You will see a ssh key that starts with 'ssh-rsa' and ends with your email address.

Copy it from 'ssh-rsa ........' to the end (your email address).

 

Register it on Github!

  1. Go to 'settings' (click your right top icon)
  2. Click 'SSH and GPG keys'
  3. Click 'New SSH key'
  4. Type whatever you want on title and paste the ssh key and register!

 

Check whether you did right

Follow the commands below to check!

$ ssh -T git@github.com

If you see this :

Just type yes

 

Congratulations!

Now you can push and pull your codes on github via terminal! 😉

 

 

 

 

728x90