由于SSH配置文件的不匹配,导致的Permission denied (publickey)及其解决方法。
读者如要转载,请标明出处和作者名,谢谢。
地址01:http://space.itpub.net/25851087
地址02:http://www.cnblogs.com/zjrodger/
作者名:zjrodger
(1)OS:Win7 32Bit.
(2)Git:GitHub for Windows 2.0.
下载地址:https://windows.github.com/
(3)Command Shell:Git Shell.
在Win7本地平台上安装完Github for Windows 2.0后,要在本地生成密匙,向Github上上传密匙并且进行网络连通性测试。
|
F:\Workspaces\Github_Workspace> ssh -T git@github.com
Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of know n hosts. Permission denied (publickey). |
在Github for Windows 2.0默认的安装配置中,
(1)原来默认情况下的IdentifyFile的值
|
Host github.com
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
IdentityFile=~/.ssh/github_rsa
|
①Git默认安装情况下,ssh_config配置文件中的“IdentityFile”项的值:IdentityFile=~/.ssh/github_rsa
|
Host * Host github.com |
在生成新的密匙文件后,若新生成的密匙文件名字为“id_rsa”,则将ssh_config配置文件中的“IdentityFile”项的值改为“~/.ssh/id_rsa”
方法三:
|
If it says "Permission denied (publickey)" you will have to put in a passphrase for your key. Do not be tempted to just press enter...this was what worked for me...it took me five hours to realize that pressing enter made OpenSSH feel that your key was too public so that is why it is denying you from going to the next step. |
|
So as mentioned in prior answers, the
Permission denied error in Windows is because you are trying to use a key other than id_rsa.Windows lacks the bells and whistles that Linux and Mac have to try out all your public keys when trying to connect to a server via SSH. If you're using the
ssh command, you can tell it which key to use by passing the -i flag followed by the path to the key to use: |
|
F:\Workspaces\Github_Workspace> ssh -T git@github.com
Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of know n hosts. Permission denied (publickey). F:\Workspaces\Github_Workspace> ssh -i ~/.ssh/id_rsa git@github.com Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of know n hosts. Enter passphrase for key '/c/Users/Administrator/.ssh/id_rsa': Hi zjrodger! You've successfully authenticated, but GitHub does not provide shel l access. Connection to github.com closed. |
由于SSH配置文件的不匹配,导致的Permission denied (publickey)及其解决方法。的更多相关文章
- ssh分发秘钥时出现错误“Permission denied (publickey,gssapi-keyex,gssapi-with-mic)”
因为公司的服务器连接是通过xshell公钥和密码连接的,今天在ssh分发秘钥的时候出现了,下面的错误: [root@iZ2ze97cumk8opqm28h8Z .ssh]# ssh-copy-id - ...
- $ ssh -T -v git@github.com_在本地用ssh连接github出错_git@github.com: Permission denied (publickey).
$ ssh -T -v git@github.com报错: debug1: Authentications that can continue: publickey debug1: Next auth ...
- Permission denied (publickey),Gitlab & Github 多ssh key 冲突 导致的权限问题
Github 多ssh key导致的权限问题 :Permission denied (publickey) 公司用gitlib搭建了git服务器,自己已有github账号,用ssh-keygen分别生 ...
- SSH方式登录github出现Permission denied (publickey)
今天在公司上传了代码,回到家pull,结果竟然出现了“Permission denied (publickey)“这种东西.第一反应是key不对,可是上次明明用key登录过,不可能不对啊,难道是文件被 ...
- [转]权限问题导致Nginx 403 Forbidden错误的解决方法
权限问题导致Nginx 403 Forbidden错误的解决方法 投稿:junjie 字体:[增加 减小] 类型:转载 时间:2014-08-22 这篇文章主要介绍了权限问题导致Nginx 403 F ...
- SSH Key连接github提示Permission denied (publickey).错误
root@debian64:/home/xiaoliuzi/.ssh/key_backup# ssh -T git@github.com The authenticity of host 'githu ...
- github windows配置以及ssh生成 Permission denied (publickey)
1:进入cmd命令下,或者可以使用GIt工具 (如果出现了 Permission denied 或者配置多个SSH Key跳第6步) git工具 下载地址:https://git-scm.com ...
- ssh免密码登录Permission denied (publickey,gssapi-keyex,gssapi-with-mic) 的解决方案!
当出现Permission denied (publickey,gssapi-keyex,gssapi-with-mic) 警告的时候,恭喜你,你已经离成功很近了. 远程主机这里设为slave2,用户 ...
- 远程ssh登陆时报错:/bin/bash: Permission denied
远程普通用户ssh登录时,提示/bin/bash: Permission denied,用户名mas,密码正确. 首先上个图,用户远程登录步骤,转自http://www.tldp.org/LDP/LG ...
随机推荐
- Bundle对象的使用
在Android开发中,如果要通过一个Activity启动另外一个Activity,需要调用startActivity()函数,这个函数的参数是一个Intent对象,这个对象通常的初始化方式如下: I ...
- HDU 3433 (DP + 二分) A Task Process
题意: 有n个员工,每个员工完成一件A任务和一件B任务的时间给出,问要完成x件A任务y件B任务所需的最短时间是多少 思路: DP + 二分我也是第一次见到,这个我只能说太难想了,根本想不到. dp[i ...
- HDU 1244 Max Sum Plus Plus Plus
虽然这道题看起来和 HDU 1024 Max Sum Plus Plus 看起来很像,可是感觉这道题比1024要简单一些 前面WA了几次,因为我开始把dp[22][maxn]写成dp[maxn][2 ...
- Java Cardioid 心脏形曲线 (整理)
package demo; import java.awt.Color; import java.awt.Graphics; import javax.swing.JFrame; import jav ...
- curl文件上传有两种方式,一种是post_fileds,一种是infile
curl文件上传有两种方式,一种是POSTFIELDS,一种是INFILE,POSTFIELDS传递@实际地址,INFILE传递文件流句柄! );curl_setopt($ch, CURLOPT_PO ...
- 【Python】控制流语句、函数、模块、数据结构
1.三种控制流语句:if\for\while 2.每句后都要加冒号 3.有elif语句=else后加一个if 注意使用变量名! 注意缩进! 注意控制流语句后面要加冒号! 4.for i in rang ...
- 0bjective-c 之 NSString 使用详解
查找资料的时候发现不错的文章,自己翻译之后分享给大家! 一个基本的该类型字符串例子: @"This is a constant character string object"; ...
- myeclipse9 struts2配置
引用struts2所用到的jar web.xml配置如下 <?xml version="1.0" encoding="UTF-8"?> <we ...
- [Everyday Mathematic]20150212 求 $(\cos x+2)(\sin x+1)$ 的最大值
设 $$\bex t=\tan \frac{x}{2}, \eex$$ 则 $$\bex \cos x=\frac{1-t^2}{1+t^2},\quad \sin x=\frac{2t}{1+t^2 ...
- C# winform打印总结 z
http://blog.csdn.net/jing_xin/article/details/41444063 针对BEIYANG收据打印机 BTP-R580测试通过. 操作说明:http://www. ...