LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-10-2014, 11:29 AM   #1
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Rep: Reputation: Disabled
Network unreachable between two servers


Hi All ;

I am using vmware version 10.
on Top of Vmare , i installed OEL 5.5 in my local system.

Issue is : ssh command throwing error. As much as tried , NEVER IMPROVED ..

MACHINE 1 :

PHP Code:
[root@oel5 ~]# hostname -i
192.168.1.160

[root@oel5 ~]# hostname
oel5.server1.com

# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               oel5.server01.com  oel5 localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.1.160   oel5
.server1.com   server1

# ssh server2
sshserver2Temporary failure in name resolution

# ping 192.168.1.162
PING 192.168.1.162 (192.168.1.16256(84bytes of data.
64 bytes from 192.168.1.162icmp_seq=1 ttl=64 time=2.68 ms
64 bytes from 192.168.1.162
icmp_seq=2 ttl=64 time=0.761 ms
64 bytes from 192.168.1.162
icmp_seq=3 ttl=64 time=0.427 ms
64 bytes from 192.168.1.162
icmp_seq=4 ttl=64 time=0.248 ms

--- 192.168.1.162 ping statistics ---
4 packets transmitted4 received0packet losstime 3018ms
rtt min
/avg/max/mdev 0.248/1.030/2.685/0.973 ms 
MACHINE 2 :

PHP Code:
[root@oel5 ~]# hostname -i
192.168.1.162

[root@oel5 ~]# hostname
oel5.server2.com

# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               oel5.server02.com oel5 localhost.localdomain localhost
::1             localhost6.localdomain6 localhost6
192.168.1.162  oel5
.server2.com  server2 

[root@oel5 ~]# ssh server1
sshserver1Temporary failure in name resolution

# ping 192.168.1.160
PING 192.168.1.160 (192.168.1.16056(84bytes of data.
64 bytes from 192.168.1.160icmp_seq=1 ttl=64 time=8.94 ms
64 bytes from 192.168.1.160
icmp_seq=2 ttl=64 time=0.461 ms
64 bytes from 192.168.1.160
icmp_seq=3 ttl=64 time=0.312 ms 
PHP Code:

OS DETAIL 
:
# uname -a
Linux oel5.server2.com 2.6.18-194.el5 #1 SMP Mon Mar 29 20:06:41 EDT 2010 i686 i686 i386 GNU/Linux

# cat /etc/issue
Enterprise Linux Enterprise Linux Server release 5.5 (Carthage)
Kernel \r on an \
Thanks ..
 
Old 09-10-2014, 11:40 AM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
thiyagusham,

Your problem is not with ssh, but rather in DNS resolution. If you will add
Code:
 192.168.1.162    oel5.server2.com server2
to server1's /etc/hosts file AND
Code:
 192.168.1.160    oel5.server1.com server1 to
to server2's /etc/hosts file, then each server will know about the other. Currently, you have no way to resovle the other severs IP by name on either server.

To ensure the issue is not with shh, try ssh using IP rather than name:
from server1
Code:
 ssh 192.168.1.162
from server2
Code:
 ssh 192.168.1.160
if this fails, try the above sith ssh -v and post the results
 
Old 09-10-2014, 11:56 AM   #3
thiyagusham
Member
 
Registered: Apr 2012
Posts: 213

Original Poster
Rep: Reputation: Disabled
Hi netnix99;

Could u please tell me what was the exact problem ?

where can i fix it ?

PHP Code:
[root@oel5 ~]# hostname -i
192.168.1.162

[root@oel5 ~]# ssh 192.168.1.160
The authenticity of host '192.168.1.160 (192.168.1.160)' can't be established.
RSA key fingerprint is 8b:d7:c4:4f:dc:43:a2:d8:d4:48:b8:07:8f:4d:aa:7f.

Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '
192.168.1.160' (RSA) to the list of known hosts.
root@192.168.1.160'
s password
Last loginWed Sep 10 20:04:45 2014

[root@oel5 ~]# hostname -i
192.168.1.160

[root@oel5 ~]# hostname
oel5.server1.com 
PHP Code:
[root@oel5 ~]# hostname -i
192.168.1.160

[root@oel5 ~]# ssh 192.168.1.162
The authenticity of host '192.168.1.162 (192.168.1.162)' can't be established.
RSA key fingerprint is 25:f7:5b:8b:2e:87:ea:1a:9e:f4:b2:d1:62:d4:9c:00.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '
192.168.1.162' (RSA) to the list of known hosts.
root@192.168.1.162'
s password
Last loginWed Sep 10 20:07:19 2014 from oel5.server2.com

[root@oel5 ~]# hostname -i
192.168.1.162

[root@oel5 ~]# hostname
oel5.server2.com 
 
Old 09-10-2014, 12:58 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 18,349

Rep: Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910Reputation: 3910
Quote:
Originally Posted by thiyagusham View Post
Hi netnix99;
Could u please tell me what was the exact problem ? where can i fix it ?
Again, as you've been told before, you need to spell out your words, and quit using text-speak. And you WERE told exactly what the problem was, and where to fix it.
Quote:
Originally Posted by netnix99
If you will add
192.168.1.162 oel5.server2.com server2

to server1's /etc/hosts file AND

192.168.1.160 oel5.server1.com server1

to server2's /etc/hosts file, then each server will know about the other. Currently, you have no way to resovle the other severs IP by name on either server.
Did you not read/understand that??? Maybe go back to last year, when you asked a similar question?
http://www.linuxquestions.org/questi...le-4175455678/
...and were told to edit the /etc/hosts file?? You have to try to apply what you've been told in the past...since you're a DBA with years of Linux experience, these things should be easy and obvious.

Last edited by TB0ne; 09-10-2014 at 01:02 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network is Unreachable/Unknown host/Destination Host Unreachable [Debian] denv Linux - Networking 4 03-27-2014 03:58 PM
Network Unreachable for Destination Network other than Interface Jack10 Linux - Networking 3 08-17-2010 08:50 AM
network unreachable zigzagooo Linux - Networking 6 05-24-2009 11:17 AM
network is unreachable tbl Slackware 9 08-17-2006 08:25 AM
Network Is Unreachable!!!!!!!!!!!!!!!!!!!!! koodoo Linux - Newbie 4 02-19-2005 10:51 AM


All times are GMT -5. The time now is 10:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration