鍵を入れるフォルダに移動
$cd ~/.ssh
適当にフォルダを作成
$mkdir hoge
作成したフォルダに移動
$cd hoge
鍵を生成
1つ目のEnterは任意に鍵の名前を付けることが可能
2つ目のEnterはパスフレーズの入力だが、無しでOK
$ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/(username)/.ssh/id_rsa): id_hoge_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
$clip < ~/.ssh/hoge/id_hoge_rsa.pub
で鍵がコピー可能(Windows)$pbcopy < ~/.ssh/hoge/id_hoge_rsa.pub
(Mac)#~/.ssh/config
Host github github.com
HostName github.com
IdentityFile ~/.ssh/hoge/id_hoge_rsa
User git
SSH Keys
-> Enable SSO
-> Authorize
$ ssh -T [email protected]