关于ssh的权限拒绝
前几天还好使的,今天就出这问题了。。。
Mr-LeedeMacBook-Pro:CrazyDrag mr_lee$ ssh -T git@git.oschina.net
git@git.oschina.net's password:
Permission denied, please try again.
git@git.oschina.net's password:
Permission denied, please try again.
git@git.oschina.net's password:
Permission denied (publickey,password,keyboard-interactive).
百度了一下是权限问题 还是没解决 所以就发个帖子求解答下如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(11)
您好。问题可能是出在您本地私钥上,我帮你看了,您的公钥是添加了的。也许是您在不经意间修改过什么。或许重新生成并添加,是一个比较简单的解决方案。
您好,这个是怎么解决的?关键我出现这个问题,都不知道让输入的这个密码是什么密码?
@超级小胖 好的,那我就重新生成一次好了,谢谢哈
回复
@超级小胖 : 我也有同样的问题 但是我不知道该怎么办
回复
@超级小胖 : 你好
回复
@超级小胖 : 你能帮帮我嘛
输入 ssh -vT git@git.oschina.net 看一下debug信息
Mr-LeedeMacBook-Pro:~ mr_lee$ ssh -vT git@git.oschina.net
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to git.oschina.net [112.124.6.106] port 22.
debug1: Connection established.
debug1: identity file /Users/mr_lee/.ssh/id_rsa type -1
debug1: identity file /Users/mr_lee/.ssh/id_rsa-cert type -1
debug1: identity file /Users/mr_lee/.ssh/id_dsa type -1
debug1: identity file /Users/mr_lee/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH*
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none
debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA e3:ee:82:78:fb:c0:ca:24:65:69:ba:bc:47:24:6f:d4
debug1: Host 'git.oschina.net' is known and matches the RSA host key.
debug1: Found key in /Users/mr_lee/.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: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/mr_lee/.ssh/id_rsa
debug1: Trying private key: /Users/mr_lee/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
git@git.oschina.net's password:
我感觉 重新删了 应该能使用,但是我还是想知道为什么会这样,以后遇到该如何解决
遇见此问题的时候我的做法是删除.ssh目录 rm -rf .ssh/ 然后用ssh-keygen重新生成并且添加就没有问题了。
贴出来了。你帮忙看看
先检查一下ssh-key是否添加正确。
若添加正确还有问题。可以 输入 ssh -vT git@git.oschina.net 看一下debug信息。也可以贴上来,我们帮您看看。