通过手册指导生产ssh key或取已有的ssh key

root@iZwz93telmwbh624e5zetqZ:~# ls -al ~/.ssh
total
drwx------ root root Jun : .
drwx------ root root Oct : ..
-rw------- root root Aug : authorized_keys root@iZwz93telmwbh624e5zetqZ:~# ssh-keygen -t rsa -b -C "249757247@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase): #这里输入的是pull push密码
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:sbLxozqlCHZcdyMqvwl2uEJffZ4q3xuDbKgAjaKxlAo @qq.com
The key's randomart image is:
+---[RSA ]----+
| |
| |
| . |
| o. . o = |
|Eoo . * S . |
|O= +.o+*.. |
|*oo=+=.+=o. |
| .+.Boo..+o |
| .o.==o.o. |
+----[SHA256]-----+
root@iZwz93telmwbh624e5zetqZ:~# ll /root/.ssh/
total
drwx------ root root Oct : ./
drwx------ root root Oct : ../
-rw------- root root Aug : authorized_keys
-rw------- root root Oct : id_rsa
-rw-r--r-- root root Oct : id_rsa.pub
root@iZwz93telmwbh624e5zetqZ:~# cat /root/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDEmUXTtV7IjNwAe7uOrDrhw+YCUMkO581+JjKG+5Sd6EPzHk0a+218aqP313PUG6yzy77ApPmK6unSgDX3+dN6FtIvJfLBbpGGS+2yuWj8XiyOI9neqU3irc9Haqy6P2K18/8GoSrLmpyfbVLuBEV9O4U62NtpM/YJAoQ00Pj7akJTkuQ1rLJ/9UVf6DGpEeyxwS+BKW0QRgnoCwDBwjcU0xQMSysEtWpYLtw36KqDBQDIdBYRqaqiYCm8U2DeaptkMtlsU2M92mPEE/GOzFlWttXfHhBCktfJRlyFysvFrEOUrZ9PLICFX4bW/eBEuGakGB3iqOwpRvvOoWSv7uaL0sc6x96XfTH3ks5LAJ6VKIvSjBw9BWlky+LGtammupqVKZJVV1WCJu5kp9B2FFUl1BdjtcUXEo6salfhmkXPPgAQF3OfqdrDN6KszijtNom0TVJCwTgtR/iW3etCNX25LRwV/zpfS2yrsAupqZf7fPRoxfRDjSynRaIK778+gLqhkRrWktw6nmxifZoeA7MjQ9pSBFkyqGY5pI4BQ3woRvjUp/BxyXIEGJNQeRrVx/pV+pCuDjwA0e4IXD0EhMQNLNp6Jeihl5cw+e/gUg0cPGf18BETZB52vZhzkdf7rVec/Fc8VLO4b5b/oVxcB2rI54N6hx89zfp5hjjKlzuDRw== 249757247@qq.com
root@iZwz93telmwbh624e5zetqZ:~#

root@iZwz93telmwbh624e5zetqZ:~# ssh -T git@github.com
The authenticity of host 'github.com (13.250.177.223)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,13.250.177.223' (RSA) to the list of known hosts.
Enter passphrase for key '/root/.ssh/id_rsa':
Hi hnhycnlc888! You've successfully authenticated, but GitHub does not provide shell access.

root@iZwz93telmwbh624e5zetqZ:~# pwd
/root
root@iZwz93telmwbh624e5zetqZ:~# ls
download  dump.rdb  php_extension  telpo
root@iZwz93telmwbh624e5zetqZ:~# git clone https://github.com/hnhycnlc888/helloworld.git
Cloning into 'helloworld'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.
root@iZwz93telmwbh624e5zetqZ:~# ls
download  dump.rdb  helloworld  php_extension  telpo
root@iZwz93telmwbh624e5zetqZ:~# ll helloworld/
total 16
drwxr-xr-x  3 root root 4096 Oct 25 01:46 ./
drwx------ 14 root root 4096 Oct 25 01:46 ../
drwxr-xr-x  8 root root 4096 Oct 25 01:46 .git/
-rw-r--r--  1 root root   13 Oct 25 01:46 README.md
root@iZwz93telmwbh624e5zetqZ:~# cat helloworld/.git/config
[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = https://github.com/hnhycnlc888/helloworld.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
root@iZwz93telmwbh624e5zetqZ:~#

github配置和使用的更多相关文章

  1. window下配置SSH连接GitHub、GitHub配置ssh key

    window下配置SSH连接GitHub.GitHub配置ssh key   此经验分两部分: 第一部分介绍:在windows下通过msysGit(Git for windows.Git Bash)配 ...

  2. 跟我学SpringCloud | 第六篇:Spring Cloud Config Github配置中心

    SpringCloud系列教程 | 第六篇:Spring Cloud Config Github配置中心 Springboot: 2.1.6.RELEASE SpringCloud: Greenwic ...

  3. github配置及使用

    安装git 对于linux系统,不同发行版本的安装方法不一样,请参考https://git-scm.com/download/linux.以ubuntu为例: sudo add-apt-reposit ...

  4. github配置和git学习

    参考:http://www.eoeandroid.com/thread-272837-1-1.html http://blog.csdn.net/hcbbt/article/details/11651 ...

  5. ( 转 )Github配置

    以下转自 http://liuzhijun.iteye.com/blog/1457207 有问题请联系我删除. -----———————————————————————— 如果你的代码不知道放哪里好, ...

  6. window下配置SSH连接GitHub、GitHub配置ssh key(转)

    转自:http://jingyan.baidu.com/article/a65957f4e91ccf24e77f9b11.html 此经验分两部分: 第一部分介绍:在windows下通过msysGit ...

  7. ubuntu 14.0 下github 配置

    一:创建Repositories 1:首先在github下创建一个帐号.这个不用多说,然后创建一个Repositories. 2:然后在ubuntu下安装git相关的东东: 1 sudo apt-ge ...

  8. windows中使用Git工具连接GitHub(配置篇)

    Git在源码管理领域目前占很大的比重了,而且开源的项目很多都转到GitHub上面了.例如:jQuery, reddit, Sparkle, curl, Ruby on Rails, node.js,  ...

  9. 同一台电脑使用 gitlab 和 github 配置

    Git 客户端与服务器端的通信支持多种协议,ssh 最常用.ssh的公钥登录流程,用户将自己的公钥存储在远程主机,登录时,远程主机会向用户发送一条消息,用户用自己的私钥加密后,再发给服务器.远程主机用 ...

  10. github配置ssh密钥的方法

    配置用户名和邮箱 初次安装git需要配置用户名和邮箱,否则git会提示:please tell me who you are. 你需要运行命令来配置你的用户名和邮箱: $ git config --g ...

随机推荐

  1. 阶段1 语言基础+高级_1-3-Java语言高级_06-File类与IO流_09 序列化流_5_InvalidClassException异常_原理

    序列化一遍 反序列化再来一遍 age的修饰符改为public 直接反序列化就会抛出异常 序列化的时候会给Person.class添加序列号,serialVersionUID,.反序列化需要对比这个se ...

  2. Log4net使用(一)

    转自:http://blog.csdn.net/much0726/article/details/3725563 转自:https://q.cnblogs.com/q/52302/ log4net,既 ...

  3. Linq查询语法(2)

    转:http://www.cnblogs.com/knowledgesea/p/3897665.html 1.简单linq查询 var ss = from r in db.Am_recProSchem ...

  4. 手把手教你用Pytorch-Transformers——部分源码解读及相关说明(一)

    一.简介 Transformers是一个用于自然语言处理(NLP)的Python第三方库,实现Bert.GPT-2和XLNET等比较新的模型,支持TensorFlow和PyTorch.本文介对这个库进 ...

  5. Sentinel之熔断降级

    除了流量控制以外,对调用链路中不稳定的资源进行熔断降级也是保障高可用的重要措施之一.由于调用关系的复杂性,如果调用链路中的某个资源不稳定,最终会导致请求发生堆积.Sentinel 熔断降级会在调用链路 ...

  6. C# 数据类型之间的转换

    C数据类型转换 https://www.cnblogs.com/bluestorm/p/3168719.html 1 字符串解析为整数: a = int.Parse (Console.ReadLine ...

  7. Vue.js 源码学习笔记

    最近饶有兴致的又把最新版 Vue.js 的源码学习了一下,觉得真心不错,个人觉得 Vue.js 的代码非常之优雅而且精辟,作者本身可能无 (bu) 意 (xie) 提及这些.那么,就让我来吧:) 程序 ...

  8. vs2015上编译QT程序的环境搭建

    下载相对应版本的QT(以QT5.7.0为例),进入网站http://download.qt.io/archive/qt/5.7/5.7.0/,下载MSVC版本QT,我的系统是64位,VS版本是2015 ...

  9. CentOS7搭建Docker镜像实战

    开发十年,就只剩下这套架构体系了! >>>   一.搭建环境 使用的是VMWare 12虚拟机安装的CentOS7 安装成功后修改ip: 1. ip addr查看相关信息: 2. 修 ...

  10. Spark Streaming Transformations

    map(func):对DStream中的所有的元素进行func转换生成新的DStream flatMap(func):和map方法类似,先对DStream中的元素进行func运算,然后压平,就是说,如 ...