14 Star 81 Fork 23

北京大学-张齐勋 / 移动端开发入门实践

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Linux_ssh-keygen.md 829 Bytes
一键复制 编辑 原始数据 按行查看 历史
张齐勋 提交于 2021-04-25 21:22 . update

生成公钥和私钥

$ cd ~/.ssh
$ ssh-keygen -o
    Enter file in which to save the key (/root/.ssh/id_rsa): 
    Enter passphrase (empty for no passphrase): 
    Enter same passphrase again: 
    Your identification has been saved in /root/.ssh/id_rsa.
    Your public key has been saved in /root/.ssh/id_rsa.pub.
    The key fingerprint is:
    SHA256:ofYUUApFdLQf0u5+mlA1xnBrOLp/R9ZWhUobAs root@ecs--0005
    The key's randomart image is:
    
    上面一路回车即可

$ ls
    authorized_keys  id_rsa  id_rsa.pub

$ cat ~/.ssh/id_rsa.pub 
   ssh-rsa AAAAB3NzaC1yc2EAAAADABAjKFWVLKgOyYW2gtJ18rK5p8vGxg+vCekwcsZfIYTKDrvBtRlvQWglkzO4zttBNWgurecgV
   asM1qbhBbZUKSOYbS5vHrcLEIY6rWFgEhLu043jE2Cjy/H1pht2m7uOCGPUEOHcJ3+6PtBbghJ4AFtuFn4KLVojfMxdxNTSp/bk/
   075xbff02By........

   上面的字符串就是公钥
JavaScript
1
https://gitee.com/ss-pku/webdev.git
git@gitee.com:ss-pku/webdev.git
ss-pku
webdev
移动端开发入门实践
master

搜索帮助