I have a local git server (like GitHub/GitLab) on my OS X, and use hosts file mapping a domain (gitserver.local) to localhost or 127.0.0.1. When I test SSH, I use ssh -vT git@gitserver.local
, I get this error info:
我的OS X上有一个本地git服务器(如GitHub / GitLab),并使用hosts文件将域(gitserver.local)映射到localhost或127.0.0.1。当我测试SSH时,我使用ssh -vT git@gitserver.local,我收到此错误信息:
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /Users/Thomas/.ssh/config
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug1: Connecting to gitserver.local [127.0.0.1] port 22.
debug1: Connection established.
debug1: identity file /Users/Thomas/.ssh/id_rsa type 1
debug1: identity file /Users/Thomas/.ssh/id_rsa-cert type -1
debug1: identity file /Users/Thomas/.ssh/id_dsa type -1
debug1: identity file /Users/Thomas/.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 f7:7c:ea:4a:60:d7:c1:a0:09:83:44:6e:f3:78:3b:ab
debug1: Host 'gitserver.local' is known and matches the RSA host key.
debug1: Found key in /Users/Thomas/.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,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/Thomas/.ssh/id_rsa
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /Users/Thomas/.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,keyboard-interactive
Password:
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: No more authentication methods to try.
Permission denied (publickey,keyboard-interactive).
1 个解决方案
#1
So you made a local git user? and set up a private/public keypair for that user? That's what your example command
那你是一个本地的git用户?并为该用户设置私人/公共密钥对?这就是你的示例命令
ssh -vT git@gitserver.local ...
ssh -vT git@gitserver.local ...
indicates. If that user's shell isn't restricted, can you try something simple like
表示。如果该用户的shell不受限制,你可以尝试一些简单的东西
ssh -vT git@gitserver.local uptime
ssh -vT git@gitserver.local正常运行时间
and see if it works?
看看它是否有效?
#1
So you made a local git user? and set up a private/public keypair for that user? That's what your example command
那你是一个本地的git用户?并为该用户设置私人/公共密钥对?这就是你的示例命令
ssh -vT git@gitserver.local ...
ssh -vT git@gitserver.local ...
indicates. If that user's shell isn't restricted, can you try something simple like
表示。如果该用户的shell不受限制,你可以尝试一些简单的东西
ssh -vT git@gitserver.local uptime
ssh -vT git@gitserver.local正常运行时间
and see if it works?
看看它是否有效?