debug1: Next authentication method: publickey debug1: Trying private key: /root/.ssh/identity debug3: no such identity: /root/.ssh/identity debug1: Offering public key: /root/.ssh/id_rsa debug3: send_pubkey_test debug2: we sent a publickey packet, wait for reply debug3: Wrote 368 bytes for a total of 1495 debug1: Authentications that can continue: publickey,password debug1: Trying private key: /root/.ssh/id_dsa debug3: no such identity: /root/.ssh/id_dsa debug2: we did not send a packet, disable method debug3: authmethod_lookup password debug3: remaining preferred: ,password debug3: authmethod_is_enabled password debug1: Next authentication method: password
那个正确的密码也会提示:permission denied(publickey,password,keyboard-interactive)
ssh -vvv 会有以上错误提示。。
更改 ssh-config 里面,把前面的#去掉。
RSAAuthentication yes
PasswordAuthentication yes
然后连接的时间 直接输入 ssh server
而不是 ssh username@server
问题解决,很奇怪哦。。。
今天继续,ssh server git同步的时间会出问题。必须用 ssh username@server
再次试 ssh username@server 依然报错,
authentication that can continue keyboard-interactive
猜想可能是认证方式不对,ssh_config sshd_config这两个的配置都应该没问题的,
查看日志:
2013.10.25 10:40:54 - input_userauth_request: invalid user administrator
2013.10.25 10:40:54 - Invalid user administrator from 192.168.0.240
2013.10.25 10:40:54 - Login name administrator does not match stored username Administrator
为什么会提示登录所用的 user administrator 和 存储在ssh服务器里面的 user administrator 不匹配呢?奇怪。。
于是乎猜想可能是管理员的问题,便建一新帐号git测试。
一定要登录一下哦。在c盘下面生产 git 文件夹哦。。。
弄完后,就一路成功了。可以正常访问了。。。git也可以正常同步了。。。
难道是管理员的问题?至此搞完,一定要新建立帐号哦。。
参考:
http://superuser.com/questions/543626/ssh-permission-denied-on-correct-password-authentication
http://serverfault.com/questions/55343/cant-get-ssh-public-key-authentication-to-work
http://www.unix.com/aix/164525-ssh-error-permission-denied-publickey-keyboard-interactive.html
http://superuser.com/questions/543626/ssh-permission-denied-on-correct-password-authentication