github
ssh
linux
This page is edited from Auther: 辛西 (Cynthia)【Git】使用 SSH 金鑰與 GitHub 連線
Enter file in which to save the key (/home/kuihao-ubuntu/.ssh/id_rsa):
github_rsa_key
Enter passphrase (empty for no passphrase):
password
Enter same passphrase again:
password
The key fingerprint is:
SHA256: <sha-token> your_email@example.com
The key's randomart image is:
±–[RSA 4096]––+
| … … … |
| … … … |
| … … … |
| … … … |
| … … … |
| … … … |
| … … … |
| … … … |
| … … … |
±–-[SHA256]––-+
github_rsa_key github_rsa_key.pub
ssh-rsa ABC…89xyz== your_email@example.com
If you want to copy with command line: xclip
Settings
Access SSH and GPG keys
SSH keys New SSH keys
MyLabDesktopUbuntu2004
ssh-rsa ABC…89xyz== your_email@example.com
ECDSA key fingerprint is SHA256:************
Are you sure you want to continue connecting (yes/no/[fingerprint])?
yes
then:
Warning: Permanently added 'github.com,52.69.186.44' (ECDSA) to the list of known hosts.
Hi XXX! You've successfully authenticated, but GitHub does not provide shell access.
origin https://github.com/YourGithubUserName/YourGithubRepo.git (fetch)
origin https://github.com/YourGithubUserName/YourGithubRepo.git (push)
origin git@github.com:YourGithubUserName/YourGithubRepo.git (fetch)
origin git@github.com:YourGithubUserName/YourGithubRepo.git (push)
NOTICE!!
This article continues Cynthia's blog under the CC BY-NC-SA 4.0 license. Please cite author, link and source for republication!
以下命令要在遠端主機:
finished