--- title: '生成SSH金鑰 (Github)' date: 2020-06-18 16:57:06 tags: - RSA - SSH categories: RSA --- > * 主題:生成SSH金鑰 (Github) > * 前言:接續前幾篇,本篇簡介對稱金鑰加密後將講解AES實際應用情形 > * 叮嚀: `$` 代表對CMD或terminal(終端機)下指令 # 生成SSH金鑰 (應用於Github) (step by step) ## Step1 先安裝git * 網址 https://git-scm.com/ -- ## Step2 綁定Github ```javascript= $ git config --global user.name "Github用戶名" $ git config --global user.email "註冊時GitHub的電子信箱" ``` --- ## Step3 生成金鑰 (輸入完指令,接下來都按Enter即可) ```javascript= $ ssh-keygen -t rsa -C "註冊時GitHub的電子信箱" ``` 輸入完後會生成一個id_rsa.pub的SSH密鑰文件 --- ## Step4 至Github點選SSH Keys * 網址:https://github.com/settings/keys (點選"New SSH keys") --- ## Step5 輸入資料 1.title 隨便打 2.key的部分,貼上剛剛生成的id_rsa.pub (通常在 C:/Users/你的使用者名稱/.ssh 底下) 補充: 要把裡面的內容全部複製 完成 --- ## Step6 檢查是否成功 ```javascript= $ ssh git@github.com ``` 看到successfully authenticated就代表成功了
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up