我正在尝试从旧的ssh服务器(基于免费的ssh)迁移到新的Powershell / Win32-Openssh服务器。我已经下载了最新的测试版本,但我在客户端和服务器之间遇到了一些问题。首先我做了一些测试:
有没有人遇到过这个问题,或者对如何解决这个问题有所了解?
环境:
<div>
</div>
Client Log (jsch java logs):
2016-05-04 14:38:26,081 ERROR [stderr] (default task-69) INFO: Connecting to 10.73.28.31 port 22201
2016-05-04 14:38:26,081 ERROR [stderr] (default task-69) INFO: Connection established
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: Remote version string: SSH-2.0-OpenSSH_7.1p1 Microsoft_Win32_port_with_VS
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: Local version string: SSH-2.0-JSCH-0.1.53
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: CheckCiphers: aes256-ctr,aes192-ctr,aes128-ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour128,arcfour256
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: aes256-ctr is not available.
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: aes192-ctr is not available.
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: aes256-cbc is not available.
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: aes192-cbc is not available.
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: arcfour256 is not available.
2016-05-04 14:38:26,097 ERROR [stderr] (default task-69) INFO: CheckKexes: diffie-hellman-group14-sha1,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: SSH_MSG_KEXINIT sent
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: SSH_MSG_KEXINIT received
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server: curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server: ecdsa-sha2-nistp256
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server: chacha20-poly1305@openssh.com,aes128-ctr,aes192-ctr,aes256-ctr
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server: umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-sha1
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server: none,zlib@openssh.com
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server: none,zlib@openssh.com
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server:
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server:
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client: aes128-cbc,3des-cbc,blowfish-cbc,aes128-ctr,3des-ctr,arcfour,arcfour128
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client: aes128-cbc,3des-cbc,blowfish-cbc,aes128-ctr,3des-ctr,arcfour,arcfour128
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client: none
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client: none
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client:
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client:
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: server->client aes128-ctr hmac-sha1 none
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: kex: client->server aes128-ctr hmac-sha1 none
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: SSH_MSG_KEX_ECDH_INIT sent
2016-05-04 14:38:26,143 ERROR [stderr] (default task-69) INFO: expecting SSH_MSG_KEX_ECDH_REPLY
2016-05-04 14:38:26,175 ERROR [stderr] (default task-69) INFO: Disconnecting from 10.73.28.31 port 22201
可以看出,服务器需要来自客户端的SSH2_MSG_KEX_ECDH_INIT(定义值为32)。然而,客户端发送的确切(2016-05-04 14:38:26,143 ERROR [stderr](默认任务-69)INFO:SSH_MSG_KEX_ECDH_INIT发送)也值32.不要担心常量定义的名称,两者都有即使名称不同(SSH2_ * vs SSH _ *)
,值为32我已跟踪所有通信,看起来没问题,但服务器认为客户端发送的信息存在问题....
Server Logs:
debug2: peer client KEXINIT proposal
debug2: KEX algorithms: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256,diff
ie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521
debug2: ciphers ctos: aes128-cbc,3des-cbc,blowfish-cbc,aes128-ctr,3des-ctr,arcfour,arcfour128
debug2: ciphers stoc: aes128-cbc,3des-cbc,blowfish-cbc,aes128-ctr,3des-ctr,arcfour,arcfour128
debug2: MACs ctos: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
debug2: MACs stoc: hmac-md5,hmac-sha1,hmac-sha2-256,hmac-sha1-96,hmac-md5-96
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: ecdh-sha2-nistp256
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: none
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_INIT
debug3: w32_select fd:4
debug3: Total in fds:1
debug2: on_select - io:0067E0D0 type:1 rd:1
debug3: WSARecv - pio: 0067E0D0
debug2: WSARecv - WSARecv() returned 0, io:0067E0D0
debug3: wait() on 0 events and 0 childres
debug2: WSARecvCompletionCB - io:0067E0D0, pending_state:1, flags:0, error:0, received:88
debug3: select - returning 1
debug3: w32_read fd:4
debug3: recv - io:0067E0D0
debug2: recv - returning 88 bytes from prior completed IO, remaining:0, io:0067E0D0
debug2: set_newkeys: mode 1
ssh_dispatch_run_fatal: Connection to 10.73.24.24: invalid argument
debug1: do_cleanup
旧金山