CYGWin 和 sshd。接受身份验证,但不会连接

CYGWin 和 sshd。接受身份验证,但不会连接

我发现与此相关的所有内容都是“ssh-exchange-identification:”错误。这不会发生在我身上。我得到两行:

Connection to localhost closed by remote host.
Connection to localhost closed.

ssh -v localhost 输出:

OpenSSH_5.8p1, OpenSSL 0.9.8r 8 Feb 2011
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to localhost [::1] port 22.
debug1: Connection established.
debug1: identity file /home/tim/.ssh/id_rsa type -1
debug1: identity file /home/tim/.ssh/id_rsa-cert type -1
debug1: identity file /home/tim/.ssh/id_dsa type -1
debug1: identity file /home/tim/.ssh/id_dsa-cert type -1
debug1: identity file /home/tim/.ssh/id_ecdsa type -1
debug1: identity file /home/tim/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8
debug1: match: OpenSSH_5.8 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA 64:e3:27:90:ef:48:93:21:38:ea:9b:0e:0b:07:b0:2a
debug1: Host 'localhost' is known and matches the ECDSA host key.
debug1: Found key in /home/tim/.ssh/known_hosts:1
debug1: ssh_ecdsa_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,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/tim/.ssh/id_rsa
debug1: Trying private key: /home/tim/.ssh/id_dsa
debug1: Trying private key: /home/tim/.ssh/id_ecdsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
tim@localhost's password:
debug1: Authentication succeeded (password).
Authenticated to localhost ([::1]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: channel 0: free: client-session, nchannels 1
Connection to localhost closed by remote host.
Connection to localhost closed.
Transferred: sent 2008, received 1376 bytes, in 0.0 seconds
Bytes per second: sent 64774.0, received 44387.0
debug1: Exit status -1

我真的束手无策了,因为我根本无法让 Windows 的远程 shell 工作。我厌倦了使用 VNC 只是为了获得 shell。此外,Windows 的 shell 很糟糕,因为没有像 screen 这样的工具。谢谢

答案1

您是否考虑过使用 PuTTY 和/或 Tera Term Pro 作为可能的替代方案?它们都是“更干净”的实现。

答案2

解决了。​​无法以我的帐户登录,必须使用 sshd 作为帐户。

答案3

首先,一些友好的建议。为了你自己的理智,当你需要远程 GUI 时,停止使用 VNC 连接到 Windows 机器。RDP 将总是提供更好的体验并附带基础操作系统。

其次,Windows 上有许多 SSH 服务器,它们比使用 SSHD 的 Cygwin 麻烦少得多。有些甚至是免费的。这里有一个关于它的 ServerFault 线程:

在 Windows 上适合使用的 SSH 服务器有哪些?

相关内容