정리/기타 설정 등등
[Github] ssh키 등록
yun_s
2021. 12. 22. 16:36
728x90
반응형
SSH key 만들기
$ ssh-keygen -t ed25519 -C "your_email@example.com"
위와 같이 입력하면 다음과 같이 나온다.
Generating public/private ed25519 key pair.
Enter file in which to save the key (/root/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
두번의 질문 모두 그냥 엔터를 누른다.
그럼 다음과 같이 짠 하고 만들어진다.
Your identification has been saved in /root/.ssh/id_ed25519
Your public key has been saved in /root/.ssh/id_ed25519.pub
The key fingerprint is:
SHA256:qEFjgAtaS+yQL76U+qEFjgAtaS+yQL76U+ youtemail@example.com
The key's randomart image is:
+--[ED25519 256]--+
| +. |
|= +. |
| +. |
|+=+... .o++ .o.+|
|o.. . . S o . |
|.= o o + o o |
|o.+ + .. + o.o|
|+ +o . . |
|= +. |
+----[SHA256]-----+
Github에 key 등록
$ cd ~/.ssh
$ cat id_ed25519.pub
ssh-ed25519 6bc5bc798c6bc5bc798c6bc5bc798c6bc5bc798c youremail@example.com
위의 두 명령어를 순차적으로 입력하면 다음과 같이 공개키가 나온다.
Github의 설정에 들어가서 ssh 페이지에 들어가 'New SSH key'를 누른다.
Title에 원하는 이름을 적고, key에 아까 cat id_ed25519.pub로 확인한 공개키를 그래도 적는다.
Add SSH key를 누르면 완료!
728x90
반응형