1
aec4d 2016-12-11 00:44:12 +08:00 via iPhone
-vvv 贴出来
|
2
ibigbug 2016-12-11 01:23:51 +08:00
Write failed: Broken pipe 这不是已经连上了么?延迟太大了吧。
|
3
xiuc001 2016-12-11 01:29:01 +08:00
服务器限制了 ip 地址吧,只有公司的 ip 地址可以连,你在家里 ip 和公司不一样的
|
4
xiuc001 2016-12-11 01:31:22 +08:00
如果工作需要就找运维,如果不想麻烦运维,那么把电脑放在公司,然后在这个电脑上开一个 ngrok ,你就可以通过 ngrok 连接公司的那台电脑,然后再通过公司那台电脑就可以连公司的服务器了= =
|
5
sagaxu 2016-12-11 09:07:00 +08:00
是不是配了代理或者 vpn?
|
6
icegreen 2016-12-11 09:30:01 +08:00
应该是限制了 ip.
|
7
bjlbeyond OP @icegreen 我在家用这个电脑的里的虚拟机是可以连上公司服务器的,而且用另外的 windows 电脑也可以连上
|
11
aec4d 2016-12-11 09:57:41 +08:00
ssh xxx -vvv 看全部的日志 是什么问题自然一清二楚
|
12
bjlbeyond OP @aec4d 打印出来很多、显示密码认证已经成功了,但是不知道为啥连不上
OpenSSH_7.2p2, LibreSSL 2.4.1 debug1: Reading configuration data /Users/bjlbeyond/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 20: Applying options for * debug2: resolving "101.200.63.184" port 22 debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to 101.200.63.184 [101.200.63.184] port 22. debug1: Connection established. debug1: identity file /Users/bjlbeyond/.ssh/id_rsa type 1 debug1: key_load_public: No such file or directory debug1: identity file /Users/bjlbeyond/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/bjlbeyond/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/bjlbeyond/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/bjlbeyond/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/bjlbeyond/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/bjlbeyond/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/bjlbeyond/.ssh/id_ed25519-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_7.2 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1 debug1: match: OpenSSH_6.6.1 pat OpenSSH_6.6.1* compat 0x04000000 debug2: fd 3 setting O_NONBLOCK debug1: Authenticating to 101.200.63.184:22 as 'root' debug3: hostkeys_foreach: reading file "/Users/bjlbeyond/.ssh/known_hosts" debug3: record_hostkey: found key type ECDSA in file /Users/bjlbeyond/.ssh/known_hosts:21 debug3: load_hostkeys: loaded 1 keys from 101.200.63.184 debug3: order_hostkeyalgs: prefer hostkeyalgs: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521 debug3: send packet: type 20 debug1: SSH2_MSG_KEXINIT sent debug3: receive packet: type 20 debug1: SSH2_MSG_KEXINIT received debug2: local client KEXINIT proposal debug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,ext-info-c debug2: host key algorithms: [email protected],[email protected],[email protected],ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,[email protected],[email protected],ssh-ed25519,rsa-sha2-512,rsa-sha2-256,ssh-rsa debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc,3des-cbc debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1 debug2: compression ctos: none,[email protected],zlib debug2: compression stoc: none,[email protected],zlib debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug2: peer server KEXINIT proposal debug2: KEX algorithms: [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: host key algorithms: ssh-rsa,ecdsa-sha2-nistp256,ssh-ed25519 debug2: ciphers ctos: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: ciphers stoc: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,[email protected],[email protected],[email protected],aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,[email protected] debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-md5,hmac-sha1,[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,[email protected],hmac-sha1-96,hmac-md5-96 debug2: compression ctos: none,[email protected] debug2: compression stoc: none,[email protected] debug2: languages ctos: debug2: languages stoc: debug2: first_kex_follows 0 debug2: reserved 0 debug1: kex: algorithm: [email protected] debug1: kex: host key algorithm: ecdsa-sha2-nistp256 debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none debug3: send packet: type 30 debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug3: receive packet: type 31 debug1: Server host key: ecdsa-sha2-nistp256 SHA256:zhKCIsZhxq5sDg73S6rVQ6AAYEU1KKkkJQfoi30n5Cg debug3: hostkeys_foreach: reading file "/Users/bjlbeyond/.ssh/known_hosts" debug3: record_hostkey: found key type ECDSA in file /Users/bjlbeyond/.ssh/known_hosts:21 debug3: load_hostkeys: loaded 1 keys from 101.200.63.184 debug1: Host '101.200.63.184' is known and matches the ECDSA host key. debug1: Found key in /Users/bjlbeyond/.ssh/known_hosts:21 debug3: send packet: type 21 debug2: set_newkeys: mode 1 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug3: receive packet: type 21 debug2: set_newkeys: mode 0 debug1: rekey after 134217728 blocks debug1: SSH2_MSG_NEWKEYS received debug2: key: /Users/bjlbeyond/.ssh/id_rsa (0x7fb9cac13760) debug2: key: /Users/bjlbeyond/.ssh/id_dsa (0x0) debug2: key: /Users/bjlbeyond/.ssh/id_ecdsa (0x0) debug2: key: /Users/bjlbeyond/.ssh/id_ed25519 (0x0) debug3: send packet: type 5 debug3: receive packet: type 6 debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug3: send packet: type 50 debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug3: start over, passed a different list publickey,gssapi-keyex,gssapi-with-mic,password debug3: preferred publickey,keyboard-interactive,password debug3: authmethod_lookup publickey debug3: remaining preferred: keyboard-interactive,password debug3: authmethod_is_enabled publickey debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/bjlbeyond/.ssh/id_rsa debug3: send_pubkey_test debug3: send packet: type 50 debug2: we sent a publickey packet, wait for reply debug3: receive packet: type 51 debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Trying private key: /Users/bjlbeyond/.ssh/id_dsa debug3: no such identity: /Users/bjlbeyond/.ssh/id_dsa: No such file or directory debug1: Trying private key: /Users/bjlbeyond/.ssh/id_ecdsa debug3: no such identity: /Users/bjlbeyond/.ssh/id_ecdsa: No such file or directory debug1: Trying private key: /Users/bjlbeyond/.ssh/id_ed25519 debug3: no such identity: /Users/bjlbeyond/.ssh/id_ed25519: No such file or directory 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 |
13
bjlbeyond OP [email protected]'s password:
debug3: send packet: type 50 debug2: we sent a password packet, wait for reply debug3: receive packet: type 52 debug1: Authentication succeeded (password). Authenticated to 101.200.63.184 ([101.200.63.184]:22). debug1: channel 0: new [client-session] debug3: ssh_session2_open: channel_new: 0 debug2: channel 0: send open debug3: send packet: type 90 debug1: Requesting [email protected] debug3: send packet: type 80 debug1: Entering interactive session. debug1: pledge: network debug3: receive packet: type 91 debug2: callback start debug2: fd 3 setting TCP_NODELAY debug3: ssh_packet_set_tos: set IP_TOS 0x10 debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 1 debug3: send packet: type 98 debug1: Sending environment. debug3: Ignored env TERM_SESSION_ID debug3: Ignored env SSH_AUTH_SOCK debug3: Ignored env Apple_PubSub_Socket_Render debug3: Ignored env COLORFGBG debug3: Ignored env ITERM_PROFILE debug3: Ignored env XPC_FLAGS debug1: Sending env LANG = zh_CN.UTF-8 debug2: channel 0: request env confirm 0 debug3: send packet: type 98 debug3: Ignored env PWD debug3: Ignored env SHELL debug3: Ignored env TERM_PROGRAM_VERSION debug3: Ignored env TERM_PROGRAM debug3: Ignored env PATH debug3: Ignored env TERM debug3: Ignored env HOME debug3: Ignored env TMPDIR debug3: Ignored env USER debug3: Ignored env XPC_SERVICE_NAME debug3: Ignored env LOGNAME debug3: Ignored env ITERM_SESSION_ID debug3: Ignored env __CF_USER_TEXT_ENCODING debug3: Ignored env SHLVL debug3: Ignored env OLDPWD debug3: Ignored env ZSH debug3: Ignored env PAGER debug3: Ignored env LESS debug1: Sending env LC_CTYPE = zh_CN.UTF-8 debug2: channel 0: request env confirm 0 debug3: send packet: type 98 debug3: Ignored env LSCOLORS debug3: Ignored env MAVEN_HOME debug3: Ignored env JAVA_HOME debug3: Ignored env CLASSPATH debug3: Ignored env _ debug2: channel 0: request shell confirm 1 debug3: send packet: type 98 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug3: send packet: type 1 packet_write_wait: Connection to 101.200.63.184 port 22: Broken pipe |
14
des 2016-12-11 10:24:43 +08:00
@bjlbeyond 记得把日志中的 ip 去掉啊,另外 root 用户+密码登陆??
日志没看出来什么有用的东西,建议你去看看服务器日志 |
16
aec4d 2016-12-11 10:28:43 +08:00
http://serverfault.com/questions/692026/cant-complete-ssh-connection-after-successfully-exchanging-keys-to-ubuntu-from
看起来很复杂啊...你可以试试按照上面的做法,设置通过代理连接看看 比如你本机开了一个 1080 的端口是 socks5 代理,试一下配置添加 ProxyCommand /usr/bin/nc -X 5 -x localhost:1080 %h %p |
17
aec4d 2016-12-11 10:36:21 +08:00
忽略我上面说的代理 直接测试 ProxyCommand /usr/bin/nc %h %p
|
18
kkk330 2016-12-11 10:48:25 +08:00 via Android
iterm2 不走代理的
|
20
bjlbeyond OP 求解决办法啊
|
21
nightYe 2016-12-12 17:26:08 +08:00
公司局域网 ip 在服务器上设置白名单了吧
|