无法从 Mac SSH 到 Windows(在 cygwin 上运行 ssh 服务器)

无法从 Mac SSH 到 Windows(在 cygwin 上运行 ssh 服务器)

我使用最新版本的 cygwin 在一台全新的 Windows 7 机器上设置了一个 ssh 服务器。禁用了防火墙。

我可以从它本身、另一个 Windows 机器(使用 winssh)以及 Linux VM 上 ssh 进入它。尽管如此,我还是尝试从两台不同的 Mac 上 ssh 进入,结果两者都不会让我!

这是调试输出:

OpenSSH_5.1p1, OpenSSL 0.9.7l 28 Sep 2006
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to 3dbuild [172.18.4.219] port 22.
debug1: Connection established.
debug1: identity file /Users/Denise/.ssh/identity type -1
debug1: identity file /Users/Denise/.ssh/id_rsa type 1
debug1: identity file /Users/Denise/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5
debug1: match: OpenSSH_5.5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 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: Host '3dbuild' is known and matches the RSA host key.
debug1: Found key in /Users/Denise/.ssh/known_hosts:43
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
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: /Users/Denise/.ssh/identity
debug1: Offering public key: /Users/Denise/.ssh/id_rsa
Connection closed by [ip]

无论我是否将我的公钥放在 ssh 服务器上,它都会显示相同的输出,并在相同的地方失败。

任何帮助都将不胜感激 - 希望有人以前遇到过这种情况?

答案1

我记得遇到过这个问题。由于 MacOS X 实际上是 BSD,因此它具有额外的安全功能。请确保您的 $USER 目录是,并且您的 $USER/.ssd 设置为只有您的用户(而不是组或世界)对您的文件具有读取权限。

相关内容