SSH & SSH keys

Using the SSH protocol, you can connect and authenticate to remote servers and services. With SSH keys, you can connect to GitHub without supplying your username or password at each visit.

Before you generate an SSH key, you can check to see if you have any existing SSH keys.

1.Open Terminal.
2.Enter ls -al ~/.ssh to see if existing SSH keys are present:
ls -al ~/.ssh

image.png

存在。

Copy the SSH key to your clipboard.

If your SSH key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.
pbcopy < ~/.ssh/id_rsa.pub

Testing your SSH connection

1.Open Terminal.
2.Enter the following:

ssh -T git@github.com

出现这个:
Hi aikuyun! You've successfully authenticated, but GitHub does not provide shell access.

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • rljs by sennchi Timeline of History Part One The Cognitiv...
    sennchi阅读 7,453评论 0 10
  • 肥婆总是闻到一股尸体腐烂的恶臭。 她和老公经营着屠宰场,生意好,顾客三教九流。女儿14岁,初一,乖巧。 ...
    老爱说阅读 1,653评论 15 9