1. 程式人生 > >生成並部署SSH key

生成並部署SSH key

tee 輸入 welcome comment pos min id_rsa arp scrip

1、如何生成ssh公鑰

你可以按如下命令來生成 sshkey:

ssh-keygen -t rsa -C "[email protected]"  
# Generating public/private rsa key pair... # 三次回車即可生成 ssh key 

查看你的 public key,並把他添加到碼雲(Gitee.com) SSH key添加地址:https://gitee.com/profile/sshkeys)

cat ~/.ssh/id_rsa.pub
# ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc.... 

添加後,在終端(Terminal)中輸入

ssh -T [email protected]

若返回

Welcome to Gitee.com, yourname!

則證明添加成功。

生成並部署SSH key