【发布时间】:2015-12-17 11:45:26
【问题描述】:
我的权限被拒绝(公钥)。在 Windows 7 x64 上
我做的是:
1) 也更新了我的 git + openSSH
2) 使用 ssh-keygen -t rsa -b 4096 -C "myemail@gmailcom" 生成密钥
3) 将它们命名为“hub”,所以我在 .ssh 文件夹中有 hub + hub.pub
4) 运行 ssh-agent -s
5) 运行 ssh-agent sh -c 'ssh-add ./hub' 它说添加了身份,我无法在 Windows 上运行“eval $(ssh-agent -s)”,所以我找到了“sh -c”(顺便说一句,为什么每个人总是只写类似 unix 的指令()
6) 将我的公钥添加到我的 github 帐户中的 github SSH 密钥列表中
7) ssh -vT git@github.com
完整日志:
C:\Users\ra\.ssh>ssh -vT git@github.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to github.com [192.30.252.131] port 22.
debug1: Connection established.
debug1: identity file /.ssh/identity type -1
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version libssh-0.7.0
debug1: no match: libssh-0.7.0
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-sha1 none
debug1: kex: client->server aes128-cbc hmac-sha1 none
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Trying private key: /.ssh/identity
debug1: Trying private key: /.ssh/id_rsa
debug1: Trying private key: /.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey).
为什么我应该做其他事情?
【问题讨论】: