Mam laptopa z systemem Windows 7 i zainstalowaną VMWare Workstation 9. Używam stacji roboczej do uruchamiania dwóch maszyn wirtualnych RHEL6. Mogę ssh do mojej pierwszej maszyny wirtualnej z laptopa, ale nie ma problemu, ale jedynym sposobem, w jaki mogę ssh do mojej drugiej maszyny wirtualnej, jest najpierw ssh do mojej pierwszej maszyny wirtualnej, a następnie ssh do drugiej maszyny wirtualnej. Nie mogę ssh bezpośrednio z mojego laptopa na drugą maszynę wirtualną. Nie rozumiem dlaczego. Każda pomoc jest mile widziana.
Pierwsza maszyna wirtualna ma adres IP 192.168.204.129 ...
[redcricket@first-vm ~]$ /sbin/ifconfig
eth1 Link encap:Ethernet HWaddr 00:0C:29:CD:AB:F5
inet addr:192.168.204.129 Bcast:192.168.204.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fecd:abf5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4426 errors:0 dropped:0 overruns:0 frame:0
TX packets:5626 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:623548 (608.9 KiB) TX bytes:744029 (726.5 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:103 errors:0 dropped:0 overruns:0 frame:0
TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:12076 (11.7 KiB) TX bytes:12076 (11.7 KiB)
... i mogę ssh do z cygwin bash bez problemu.
Druga maszyna wirtualna ma adres IP 192.168.204.128 ...
[redcricket@second-vm ~]$ /sbin/ifconfig
eth1 Link encap:Ethernet HWaddr 00:50:56:34:DB:0E
inet addr:192.168.204.128 Bcast:192.168.204.255 Mask:255.255.255.0
inet6 addr: fe80::250:56ff:fe34:db0e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1738 errors:0 dropped:0 overruns:0 frame:0
TX packets:3837 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:180427 (176.1 KiB) TX bytes:623977 (609.3 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:579 errors:0 dropped:0 overruns:0 frame:0
TX packets:579 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:49032 (47.8 KiB) TX bytes:49032 (47.8 KiB)
... ale mogę uzyskać dostęp tylko z mojej pierwszej maszyny wirtualnej. Nie mogę ssh do drugiej maszyny wirtualnej z mojego laptopa z Windows 7.
Mogę pingować drugą maszynę wirtualną od pierwszej tak ...
[redcricket@first-vm ~]$ ping 192.168.204.128
PING 192.168.204.128 (192.168.204.128) 56(84) bytes of data.
64 bytes from 192.168.204.128: icmp_seq=1 ttl=64 time=0.716 ms
64 bytes from 192.168.204.128: icmp_seq=2 ttl=64 time=0.480 ms
64 bytes from 192.168.204.128: icmp_seq=3 ttl=64 time=0.476 ms
64 bytes from 192.168.204.128: icmp_seq=4 ttl=64 time=0.468 ms
^C
--- 192.168.204.128 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3539ms
rtt min/avg/max/mdev = 0.468/0.535/0.716/0.104 ms
... ale nie mogę pingować drugiej maszyny wirtualnej z mojego laptopa ...
redcricket@redcricket-WS ~
$ ping 192.168.204.128
Pinging 192.168.204.128 with 32 bytes of data:
Request timed out.
redcricket@redcricket-WS ~
$ ping 192.168.204.129
Pinging 192.168.204.129 with 32 bytes of data:
Reply from 192.168.204.129: bytes=32 time<1ms TTL=64
Reply from 192.168.204.129: bytes=32 time<1ms TTL=64
Oto dane wyjściowe ipconfig mojego laptopa z Windows 7 ...
redcricket@redcricket-WS ~
$ ipconfig
Windows IP Configuration
Ethernet adapter Local Area Connection 2:
Connection-specific DNS Suffix . : example.com
Link-local IPv6 Address . . . . . : fe80::709e:73cb:3d7e:9992%18
IPv4 Address. . . . . . . . . . . : 10.21.77.85
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 10.21.77.86
Wireless LAN adapter Wireless Network Connection:
Connection-specific DNS Suffix . : hsd1.ca.comcast.net
IPv6 Address. . . . . . . . . . . : 2601:9:2700:203:1585:d702:3be9:dae0
Temporary IPv6 Address. . . . . . : 2601:9:2700:203:d4fe:865d:20af:3c0e
Link-local IPv6 Address . . . . . : fe80::1585:d702:3be9:dae0%11
IPv4 Address. . . . . . . . . . . : 192.168.1.108
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : fe80::22aa:4bff:fef7:cb59%11
192.168.1.1
Ethernet adapter Local Area Connection:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Ethernet adapter VMware Network Adapter VMnet1:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::e4dd:925b:7620:6276%22
IPv4 Address. . . . . . . . . . . : 192.168.40.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter VMware Network Adapter VMnet8:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::843:8b09:a64b:7d09%23
IPv4 Address. . . . . . . . . . . : 192.168.204.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Tunnel adapter isatap.{31858BE6-6593-43AA-BB05-86411AA5F684}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Tunnel adapter Teredo Tunneling Pseudo-Interface:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Tunnel adapter isatap.{19E3EFC7-E040-4FE5-9241-B8DE273669B4}:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Tunnel adapter isatap.hsd1.ca.comcast.net:
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . : hsd1.ca.comcast.net
Tunnel adapter isatap.example.com:
Connection-specific DNS Suffix . : example.com
Link-local IPv6 Address . . . . . : fe80::5efe:10.21.77.85%29
Default Gateway . . . . . . . . . :
źródło
sshd_config
nie mogę nawet pingować z laptopa na drugą maszynę wirtualną.