PING可以工作,但我不能SSH。

PING可以工作,但我不能SSH。,ssh,Ssh,机器A和B正在尝试连接到机器C A到达那里。当我使用ssh-v ip时,我得到: OpenSSH_5.1p1, OpenSSL 0.9.8j-fips 07 Jan 2009 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to C.server.ip.addy [C.server.ip.addy] port 22. debug1: f

机器A和B正在尝试连接到机器C

A到达那里。当我使用ssh-v ip时,我得到:

OpenSSH_5.1p1, OpenSSL 0.9.8j-fips 07 Jan 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to C.server.ip.addy [C.server.ip.addy] port 22.
debug1: fd 3 clearing O_NONBLOCK
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to C.server.ip.addy [C.server.ip.addy] port 22.
debug1: connect to address C.server.ip.addy port 22: Connection timed out
ssh: connect to host C.server.ip.addy port 22: Connection timed out
然后还有更多不重要的调试

B去不了那里。当我使用ssh-v ip时,我得到:

OpenSSH_5.1p1, OpenSSL 0.9.8j-fips 07 Jan 2009
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to C.server.ip.addy [C.server.ip.addy] port 22.
debug1: fd 3 clearing O_NONBLOCK
OpenSSH_5.9p1 Debian-5ubuntu1, OpenSSL 1.0.1 14 Mar 2012
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to C.server.ip.addy [C.server.ip.addy] port 22.
debug1: connect to address C.server.ip.addy port 22: Connection timed out
ssh: connect to host C.server.ip.addy port 22: Connection timed out
永远无法到达的线是:

debug1: fd 3 clearing O_NONBLOCK

这是什么原因造成的?请帮忙

一个可能的原因可能是防火墙配置错误(允许端口443上的a=>C,B=>C=拒绝)


在任何情况下,如果您可以访问C机器,请放置一个数据包嗅探器(如WireShark),并检查来自B的数据包是否实际到达了机器。

我可以想出几个可能导致此情况的因素

  • B->C之间的防火墙可能会阻止连接。这些机器在同一子网上吗?有防火墙吗?这样的规则可能允许您连接C->B。您可以使用scp将文件拉向这个方向。差不多

    C$scpuser@B:/path/to/file/local/path/to/file

  • tcpwrapper规则可能具有类似的效果。在/etc/hosts.deny中是否有阻止机器B的SSH的规则?检查hosts.allow和hosts.deny手册页,了解有关更改tcpwrapper规则的信息

  • 您应该使用nmap来检查哪些端口是开放的,并且可以从B和A访问。类似下面的内容应该会给您一些好的信息。如果端口22从A打开,但不是从B打开,则上述其中一个端口可能会阻塞它

    nmap -T4 -A -P0 -p0-65535 C
    

    443不是HTTP的吗?我正在尝试将应用程序文件从B复制到C,以部署到使用端口8879的WebSphere。这将不会使用internet.HTTP over TLS/SSL(HTTPS)。但原则是适用的:您可以检查服务器C的TCP端口8879是否设置了任何特定规则。明天我将检查这些选项。谢谢你迄今为止的帮助!