linux – SSH到新子网中的机器 – 连接超时
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了linux – SSH到新子网中的机器 – 连接超时,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2619字,纯文字阅读大概需要4分钟。
内容图文
![linux – SSH到新子网中的机器 – 连接超时](/upload/InfoBanner/zyjiaocheng/958/65c31d1eb9c44f0bb240f8e9b2d98b74.jpg)
我正在使用RHEL4和RHEL5.
最近使用172.16.32.0/24设置了一组新的Linux机器.现有的RHEL计算机运行在172.16.1.0/22和172.16.4.0/22上.当我尝试从172.16.4.39 ssh到172.16.1.1时,没有问题.
> traceroute 172.16.1.156
traceroute to 172.16.1.156 (172.16.1.156), 30 hops max, 46 byte packets
1 swt0 (172.16.4.240) 1.396 ms 1.380 ms 1.758 ms
2 172.16.1.156 (172.16.1.156) 579.076 ms 573.315 ms 574.878 ms
如果我ssh到新机器的任何一个,我得到ssh超时,虽然我可以追踪到它.
> traceroute 172.16.32.11
traceroute to 172.16.32.11 (172.16.32.11), 30 hops max, 46 byte packets
1 swt0 (172.16.4.240) 5.968 ms 1.641 ms 1.476 ms
2 * * * <----- could be misconfiguration, not sure how to troubleshoot this.
3 172.16.32.11 (172.16.32.11) 273.330 ms 271.820 ms 274.223 ms
> ssh -v -v -v 172.16.32.11
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 172.16.32.11 [172.16.32.11] port 22.
debug1: connect to address 172.16.32.11 port 22: Connection timed out
ssh: connect to host 172.16.32.11 port 22: Connection timed out
我在交换机(swt0)和防火墙上添加了一个类似的路由,指向172.16.32.0/24到同一网关172.16.5.253.还在172.16.4.39(我尝试ssh的机器)上的hosts.allow文件中添加了一个新行.
> cat /etc/hosts.allow
ALL: 127.0.
ALL: 172.16.0.0/255.255.252.0
ALL: 172.16.4.0/255.255.252.0
ALL: 172.16.24.0/255.255.252.0
ALL: 172.16.32.0/255.255.255.0
任何建议我应该检查/更改其他文件使ssh在172.16.4.0/22 172.16.32.0/24之间工作?
输出ping和路由-n:
> route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
172.16.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 172.16.4.240 0.0.0.0 UG 0 0 0 eth0
> ping 172.16.32.11
PING 172.16.32.11 (172.16.32.11) 56(84) bytes of data.
64 bytes from 172.16.32.11: icmp_seq=0 ttl=62 time=269 ms
64 bytes from 172.16.32.11: icmp_seq=1 ttl=62 time=259 ms
64 bytes from 172.16.32.11: icmp_seq=2 ttl=62 time=269 ms
64 bytes from 172.16.32.11: icmp_seq=3 ttl=62 time=268 ms
--- 172.16.32.11 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3005ms
rtt min/avg/max/mdev = 259.331/266.884/269.777/4.408 ms, pipe 2
解决方法:
两个网络之间的路由器是否有可能限制您可以访问哪些端口的防火墙?防火墙可能允许您发送ICMP数据包(ping),但不能发送ssh数据包.尝试进行172.16.32.11的端口扫描:
nmap 172.16.32.11
它应该显示它可以到达哪些端口,以及哪些端口被防火墙阻止(“已过滤”).
06001
嗯,这些延迟是怎么回事?网络是否通过慢速链接连接,或者这是另一个问题的可能症状?在LAN中,您应该得到延迟<1ms.
内容总结
以上是互联网集市为您收集整理的linux – SSH到新子网中的机器 – 连接超时全部内容,希望文章能够帮你解决linux – SSH到新子网中的机器 – 连接超时所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。