UbuntuでGitHubのSSH接続設定

WindowsのWSL環境で行いました。

$ cd ~/.ssh
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/shoi/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 

$ xsel --clipboard --input < id_rsa.pub

ここでGitHubSSHキーをペースト。

$ ssh -T git@github.com
Hi yourname! You've successfully authenticated, but GitHub does not provide shell access.

この表示が出れば成功。