其他问题 为什么 ssh 无法连接到服务器?

lem · 2015年03月26日 · 最后由 豆芽芽 回复于 2015年07月20日 · 208 次阅读

bash 执行结果如下

bash$ ssh -vT git@coding.net OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /home/xxxx/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug1: Connecting to coding.net [180.150.189.170] port 22. debug1: Connection established. debug1: identity file /home/xxxxx/.ssh/id_rsa type 1 debug1: identity file /home/xxxxx/.ssh/id_rsa-cert type -1 debug1: identity file /home/xxxxx/.ssh/id_dsa type -1 debug1: identity file /home/xxxxx/.ssh/id_dsa-cert type -1 debug1: identity file /home/xxxxx/.ssh/id_ecdsa type -1 debug1: identity file /home/xxxxx/.ssh/id_ecdsa-cert type -1 debug1: identity file /home/xxxxx/.ssh/id_ed25519 type -1 debug1: identity file /home/xxxxx/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-8 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2 debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000 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: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY Connection closed by 180.150.189.170


共收到 4 条回复

你有上传公钥么?

OpenSSH_6.7p1, OpenSSL 0.9.8zc 15 Oct 2014
debug1: Reading configuration data /Users/jack/.ssh/config
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Connecting to coding.net [180.150.189.170] port 22.
debug1: Connection established.
debug1: identity file /Users/jack/.ssh/id_rsa type 1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jack/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jack/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jack/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jack/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jack/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jack/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/jack/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.7
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.2
debug1: match: OpenSSH_6.2 pat OpenSSH* compat 0x04000000
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr umac-64-etm@openssh.com none
debug1: kex: client->server aes128-ctr umac-64-etm@openssh.com none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: RSA 98:ab:2b:30:60:00:82:86:bb:85:db:87:22:c4:4f:b1
debug1: Host 'coding.net' is known and matches the RSA host key.
debug1: Found key in /Users/jack/.ssh/known_hosts:43
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
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/jack/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to coding.net ([180.150.189.170]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Remote: Forced command.
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
Coding.net Tips : [Hello ! You've connected to Coding.net by SSH successfully! ]
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 3236, received 3376 bytes, in 0.1 seconds
Bytes per second: sent 35224.0, received 36747.9
debug1: Exit status 0

我的结果是这样

请问问题解决了么?

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
相关话题