SSH Key ์ƒ์„ฑ ๋ฐฉ๋ฒ•

0x01. ํ‚ค ์ƒ์„ฑ

ssh-keygen -t rsa -b 4096 -C [GitHub ์ด๋ฉ”์ผ ์ฃผ์†Œ]
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/you/.ssh/id_rsa): 
Enter passphrase for "/Users/you/.ssh/id_rsa" (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/you/.ssh/id_rsa
Your public key has been saved in /Users/you/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:...
The key's randomart image is:
+---[RSA 4096]----+
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
|                 |
+----[SHA256]-----+
 

0x02. ๊ณต๊ฐœํ‚ค ๋ณต์‚ฌ

pbcopy < ~/.ssh/id_rsa.pub

0x03. Github ๊ณ„์ •์— SSH Key ์ถ”๊ฐ€

[Settings] > [SSH and GPG Keys] ์—์„œ ๋ณต์‚ฌํ•œ SSH Key ๋ถ™์—ฌ๋„ฃ๊ธฐ

0x04. ์—ฐ๊ฒฐ ํ™•์ธ

ssh -T git@github.com