没解决的问题-git连接失败
[parallels@localhost ~]$ ssh-keygen -t rsa -C ‘1012144290@qq.com’
Generating public/private rsa key pair.
Enter file in which to save the key (/home/parallels/.ssh/id_rsa):
/home/parallels/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/parallels/.ssh/id_rsa.
Your public key has been saved in /home/parallels/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:Ke2QA9DdBQkezUxbxr2LrUJsvDpp7WowUEmZ87poKtY ‘1012144290@qq.com’
The key's randomart image is:
[root@localhost .ssh]# ssh -T -v git@github.com
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to github.com [13.250.177.223] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version babeld-d410d4f8
debug1: no match: babeld-d410d4f8
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: curve25519-sha256 need=64 dh_need=64
debug1: kex: curve25519-sha256 need=64 dh_need=64
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss>
^C
[root@localhost .ssh]#
[root@localhost .ssh]# ssh -i /home/parallels/.ssh/id_rsa.pub. -vT git@github.com
Warning: Identity file /home/parallels/.ssh/id_rsa.pub. not accessible: No such file or directory.
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 58: Applying options for *
debug1: Connecting to github.com [13.229.188.59] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/0
debug1: identity file /root/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /root/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.4
debug1: Remote protocol version 2.0, remote software version babeld-d410d4f8
debug1: no match: babeld-d410d4f8
debug1: Authenticating to github.com:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256
debug1: kex: host key algorithm: rsa-sha2-512
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: curve25519-sha256 need=64 dh_need=64
debug1: kex: curve25519-sha256 need=64 dh_need=64
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /root/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,sk-ssh-ed25519-cert-v01@openssh.com,sk-ecdsa-sha2-nistp256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,sk-ssh-ed25519@openssh.com,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,ecdsa-sha2-nistp521,ecdsa-sha2-nistp384,ecdsa-sha2-nistp256,rsa-sha2-512,rsa-sha2-256,ssh-rsa,ssh-dss>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug1: Authentications that can continue: publickey
debug1: Trying private key: /root/.ssh/id_dsa
debug1: Trying private key: /root/.ssh/id_ecdsa
debug1: Trying private key: /root/.ssh/id_ed25519
debug1: No more authentication methods to try.
Permission denied (publickey).
Permissions 0644 for '/root/.ssh/id_rsa.pub' are too open
WaldeinCheng 2018-11-12 10:27:54 2092 收藏
分类专栏: Bugs 文章标签: Centos git ssh
版权
今天在进行向ssh-agent服务中添加git密钥时,出现下面错误
Permissions 0644 for '/root/.ssh/id_rsa.pub' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
1
2
3
根据翻译应该是权限太大,访问太过随意,ssh自身的安全策略把我的操作命令拒绝了
修改把权限降低即可
chmod 0600 ~/.ssh/id_rsa.pub
1
解决,nice!
————————————————
版权声明:本文为CSDN博主「WaldeinCheng」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_34691713/article/details/83987873
git操作常见错误处理
1.Error:The authenticity of host 'github.com (192.30.255.112)' can't be established.
The authenticity of host 'github.com (192.30.255.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKY8.
Are you sure you want to continue connecting (yes/no)?1234
直接输入 yes 回车,这时在ssh目录下除id_rsa,id_rsa.pub文件外,还会生成一个know_hosts 文件。
PTY allocation request failed on channel 0
You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
ssh -T git@github.com
[root@control-compute00 nova]# ssh-add
Could not open a connection to your authentication agent.
[root@control-compute00 nova]# ssh-agent bash
[root@control-compute00 nova]# ssh-add -l
The agent has no identities.
[root@control-compute00 nova]# ssh-add ~/.ssh/id_rsa
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
各文件夹权限均是正确的。经查因seLinux设置问题:
在被远程服务器的seLinux上关闭
getenforce查看当前模式。如果为disabled即是关闭状态。
vi /etc/selinux/config打开selinux配置文件
保存即可。
没解决的问题-git连接失败的更多相关文章
- 域账号修改后,导致vs中的git连接失败
域账号修改后,导致vs中的git连接失败, fatal: Authentication failed for https://blog.csdn.net/qq_34665539/article/det ...
- 解决idea中mysql连接失败Could not create connection to database server. Attempted reconnect 3 times. Giving up.
原因是少一个参数,设置时区的. 解决方法: 加一个参数: serverTimezone=UTC jdbc:mysql://localhost:3306/SshProject?useUnicode=t ...
- pip install 提示代理连接失败原因及解决办法
# pip install 提示代理连接失败原因及解决办法 1. 错误提示 在公司电脑上安装Python的虚拟环境时输入命令: pip install virtualenv 系统提示以下异常信息: R ...
- Fiddler抓包连接失败502的解决方法
本篇用户记录,在用Fiddler遇到过的坑,首先, 先上图,遇到的问题,提示主机连接失败.只是打开Fiddler,不会报这个问题,只有当Fiddler和火狐浏览器一起启动的时候,才会报这个错. 尝试去 ...
- 【问题解决方案】git clone失败的分析和解决
参考链接 git_clone资源获取失败解决 使用Git clone代码失败的解决方法 [Git] Clone failed 克隆失败的解决方法 问题描述: 无论是git clone还是pull,均失 ...
- Android HttpURLConnection.connect找不到源 HttpURLConnection连接失败 HttpURLConnection.connect IO异常 解决办法
Android HttpURLConnection.connect找不到源 HttpURLConnection连接失败 HttpURLConnection.connect IO异常 解决办法 以下代 ...
- eclipse marketplace网络连接失败的解决方法
2015-12-04 01:12:33 本想在eclipse上安装一个插件,点进help-EclipseMarketplace却连接失败,错误如下: 在help-instal new software ...
- HBase的Java Api连接失败的问题及解决方法
分布式方式部署的HBase,启动正常,Shell操作正常,使用HBase的Java Api操作时总是连接失败,信息如下: This server is in the failed servers li ...
- 【常见的SQL Server连接失败错误以及解决方法】
[常见的SQL Server连接失败错误以及解决方法] http://blog.csdn.net/feixianxxx/article/details/5523922 ADO连接SQL Server ...
- 在Ubuntu 18.04系统中蓝牙鼠标连接失败问题的解决
2018-08-22 16:00:35作者:谖瓞稿源:linux站 如果你在Ubuntu 18.04操作系统中有蓝牙鼠标连接失败问题,那就参考下面的解决方法处理. 解决方法 首先在系统终端下输入: b ...
随机推荐
- HBase架构及读写流程
HBase架构: Client 访问HBase的接口并维护cache来加快对HBase的访问 Zookeeper 1.保证任何时候,集群中只有一个活跃master 2.存储所 ...
- GoLang中signal.Notify函数用法
官方描述: Notify函数让signal包将输入信号转发到c.如果没有列出要传递的信号,会将所有输入信号传递到c:否则只传递列出的输入信号. signal包不会为了向c发送信息而阻塞(就是说如果发送 ...
- axios 进行同步请求(async+await+promise)
axios 进行同步请求(async+await+promise) 遇到的问题介绍 将axios的异步请求改为同步请求想到了async 和await.Promise axios介绍 Axios 是一个 ...
- 【MySQL】导出到CSV
http://www.yiidian.com/mysql/mysql-export-table-to-cvs.html 要将表导出为 CSV 文件,我们将使用SELECT INTO....OUTFIL ...
- 金蝶AAS-V9精简版使用手册1.6
1.安装 获取中间件安装包(AAAS.V9.ZIP)直接解压即可. 1.1.需安装jdk环境,上篇文章 1.2.路径没有特定要求,通常放置在/opt下 2.初次启动金蝶需要前台启动设置管控密码 lin ...
- flannel 关闭SNAT
flannel 关闭SNAT 默认情况下,flannel 访问集群外网络是通过 SNAT 成宿主机 ip 方式,在一些金融客户环境中为了能实现防火墙规则,需要直接针对 POD ip 进行进行规则配置, ...
- vue 退出登录页面跳转 浏览器localStorage中的值没有改变
vuex中的loginout方法actions:{ loginout(data:string){ return new Promise(((resolve, reject)=>{ setTime ...
- [CSS]背景图片很大,根据屏幕缩小适配后,div之间有空隙的问题
RT.美术给的素材宽度是1080px的. 在不缩放的情况下,1080px宽度的屏幕显示div之间正常,没有空隙,但使用transform属性之后,div缩小,div之间有空隙(白线) 百度有人说给这些 ...
- finalshell如何查看密码
1.右键点击导出 2.打开导出的配置文件,搜索password,找到password的编码后的字符串复制 3.运行下面代码,即可查看原来的密码,把main()方法的字符串替换成上一步复制的字符串imp ...
- Software--C#--grammer_Delegate--Event
2018-05-01 10:49:47 委托是一种类型,而事件是一个类或结构的成员,如同字段,属性.必须在类或结构中声明. 引申 - Observe 观察者模式 Publish/Subscribe ...