Git

[Git / Github] SSH key 생성, 등록

189bigman 2023. 1. 22. 01:28

SSH 키 생성

https://docs.github.com/ko/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

 

새 SSH 키 생성 및 ssh-agent에 추가 - GitHub Docs

About SSH key passphrases You can access and write data in repositories on GitHub.com using SSH (Secure Shell Protocol). When you connect via SSH, you authenticate using a private key file on your local machine. For more information, see "About SSH." When

docs.github.com

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

생성한 키 확인

cat ~/.ssh/id_rsa.pub

 

키 예시

$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAklOUpkDHrfHY17SbrmTIpNLTGK9Tjom/BWDSU
GPl+nafzlHDTYW7hdI4yZ5ew18JH4JW9jbhUFrviQzM7xlELEVf4h9lFX5QVkbPppSwg0cda3
Pbv7kOdJ/MTyBlWXFCR+HAo3FXRitBqxiX1nKhXpHAZsMciLq8V6RjsNAQwdsdMFvSlVK/7XA
t3FaoJoAsncM1Q9x5+3V0Ww68/eIFmb1zuUFljQJKprrX88XypNDvjYNby6vw/Pb0rwert/En
mZ+AW4OZPnTPI89ZPmVMLuayrD2cE86Z/il8b+gw3r3+1nKatmIkjn2so1d01QraTlMqVSsbx
NrRFi9wrf+M7Q== schacon@mylaptop.local

 

 

 

SSH 키 등록

https://docs.github.com/ko/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

 

GitHub 계정에 새 SSH 키 추가 - GitHub Docs

About addition of SSH keys to your account You can access and write data in repositories on GitHub.com using SSH (Secure Shell Protocol). When you connect via SSH, you authenticate using a private key file on your local machine. For more information, see "

docs.github.com

 

키를 복사해 깃허브에 등록

이동 후 왼쪽 SSH and GPG Keys 

New SSH key 여기에 복사한 ssh 키를 붙여넣기 저장.