通过手册指导生产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. SharpBrowser

    SharpBrowser is the fastest open source C# web browser there is! Slightly faster than Google Chrome ...

  2. 应用安全 - SuiteCRM - 漏洞汇总

    CVE-2019-12598.CVE-2019-12601 SuiteCRM SQL注入与远程代码执行漏洞 SalesAgility SuiteCRM .x版本..x版本和7..5之前的7..x版本中 ...

  3. python基础-9__import__ 反射和面向对象基础 self 封装 继承(多继承顺序) 多态

    一 反射 python中的反射功能是由以下四个内置函数提供:hasattr.getattr.setattr.delattr,改四个函数分别用于对对象内部执行:检查是否含有某成员.获取成员.设置成员.删 ...

  4. [2019杭电多校第七场][hdu6656]Kejin Player

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6656 题意为从i级花费a元有p的概率升到i+1级,有1-p的概率降到x级(x<i),查询从L级升 ...

  5. Python自学第二天学习之《元组与字典》

    一.  元组:tuple类型,元组一级元素 不能修改 不能增加 不能删除,是有序的. 格式 :tu=(1,2,3,4,5,6) 1.类型转换: #字符串转换成元组 b=“123” c=tuple(b) ...

  6. PS使用记录:人像(证件照)更换背景

    PS使用记录:人像(证件照)更换背景 参考:非常干净的抠羽毛ps教程抠图羽毛 (1)准备2019PS,原图 (2)选择人像:选择->主体 (3)边缘处理:选择 ->选择并遮住 ->选 ...

  7. 被我误解的max_connect_errors

    第一节  什么是max_connect_errors 一开始接触这个参数的时候,感觉他和max_connections的含义差不多,字面意思简单明了,这个参数的含义是最大连接错误数,翻翻mysql的文 ...

  8. http请求中的Content-Length作用机制与分块chunked

    httpclient-4.5.9.jar org.apache.http: auth     身份 client    端 conn     连接 cookie  本地 impl:    实现 exe ...

  9. Thymeleaf简介

    Thymeleaf Thymeleaf简介 Thymeleaf是一个流行的模板引擎,该模板引擎采用Java语言开发,模板引擎是一个技术名词,是跨领域跨平台的概念,在Java语言体系下有模板引擎,在C# ...

  10. AOP记录日志

    1.自定义注解 @Target(ElementType.METHOD) //注解放置的目标位置,METHOD是可注解在方法级别上 @Retention(RetentionPolicy.RUNTIME) ...