How do I access my SSH public key?

前端 未结 19 953
星月不相逢
星月不相逢 2021-01-29 17:04

I\'ve just generated my RSA key pair, and I wanted to add that key to GitHub.

I tried cd id_rsa.pub and id_rsa.pub, but no luck. How can I acce

19条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-29 17:39

    Copy the key to your clipboard.

    $ pbcopy < ~/.ssh/id_rsa.pub
    # Copies the contents of the id_rsa.pub file to your clipboard
    

    Warning: it's important to copy the key exactly without adding newlines or whitespace. Thankfully the pbcopy command makes it easy to perform this setup perfectly.

    and paste it wherever you need.

    More details on the process, check: Generating SSH Keys.

提交回复
热议问题