LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-07-2017, 03:50 PM   #1
fuzzyelbows
LQ Newbie
 
Registered: Aug 2017
Posts: 5

Rep: Reputation: Disabled
centOS 5.5: eth0 and lo show up in ifconfig, but cannot use ssh? (No route to host)


The system:
I am using a cluster of four physical machines all running on CentOS 5.5 (64 bit). I do not have the option to upgrade to a newer version of CentOS. When it is working, each machine can use "ssh" to access the others- for example c1 can "ssh c2".

I have been informed that each machine has two net cards, and ifconfig -a reflects this by giving lo, eth0, and eth1.

The current problem:
One of the clusters, c4, is not able to use the ssh command. When I try to enter externally from c1, I cannot ping it, and I get

"ssh: connect to port c4 port 22: no route to host"


When accessing c4 directly, I can use it as normal, but cannot ssh or ping anything.

Using the ifconfig command shows that both eth0 and lo are in existence.


Previous things tried:
Originally, eth0 did not show up on ifconfig.
I tried

ifconfig eth0 (ip address) netmask 255.255.255.0

This made eth0 show up in the ifconfig results. I can toggle it on and off of that list with "ifup eth0" and "ifdown eth0".


In conclusion:
If you should need any additional information I would be more than happy to provide it! I am extremely new to linux (and computer work in general), so there may be some improper use of terminology.
 
Old 08-07-2017, 04:24 PM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010
Try enabling eth1 and see if you can reach the host then.
 
Old 08-07-2017, 04:38 PM   #3
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 664

Rep: Reputation: 190Reputation: 190
Are you certain the problem box has network connectivity? What's the output of
Code:
ip a
 
Old 08-07-2017, 04:59 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,608

Rep: Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168
Has any changes been done to any of the computers lately?

Do the machines use both interfaces? Do you know how the network is configured?

Can you ping other computer by their IP address versus hostname?

Post the output of the route command.

Last edited by michaelk; 08-07-2017 at 05:09 PM.
 
Old 08-07-2017, 05:03 PM   #5
fuzzyelbows
LQ Newbie
 
Registered: Aug 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
AwesomeMachine: I just tried to bring up eth1 using "ifup eth1", this brings it to the same state as eth0? (appears in ifconfig but will not connect)

TheEzekielProject: The output is written below. Sorry it's not nice looking, but I cannot copy/paste due to the connectivity issue.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0:<NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:30:48:f8:72:b8 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.3/24 brd 192.168.0.255 scope global eth0
3: eth1: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00.30:48:f8:72:b9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::23048ff:fef8:72b9/64 scope link
valid_lft forever preferred_lft forever
4: sit0: <NOARP>mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0


Thank you both for your suggestions!
 
Old 08-07-2017, 05:13 PM   #6
fuzzyelbows
LQ Newbie
 
Registered: Aug 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
michaelk:

(Oh look, I can quote! Neat.)
Quote:
Originally Posted by michaelk View Post
5.5 is so old that ip had not be "invented" yet...

Has any changes been done to any of the computers lately?
No changes have been made to the computers since a new user was added to the system in... march, I believe? It went down fairly recently, so I hope that's not the issue.

Quote:
Originally Posted by michaelk View Post
Do the machines use both interfaces? Do you know how the network is configured?
I am unsure how to respond to these, I'm sorry. If you mean how they are used in daily operation, putty is typically used to access c1, from which one can ssh to c2-4. I know that c1 has both a local and a global ip address?

Quote:
Originally Posted by michaelk View Post
Can you ping other computer by their IP address versus hostname?
I attempted this, but it still gave me the "no route to host" message.

Quote:
Originally Posted by michaelk View Post
Post the output of the route command.
Apologies if posting messes up the table.

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 * 255.255.255.0 U 0 0 0 eth0
169.254.0.0 * 255.255.0.0 U 0 0 0 eth0
 
Old 08-07-2017, 05:24 PM   #7
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 664

Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by fuzzyelbows View Post
AwesomeMachine: I just tried to bring up eth1 using "ifup eth1", this brings it to the same state as eth0? (appears in ifconfig but will not connect)

TheEzekielProject: The output is written below. Sorry it's not nice looking, but I cannot copy/paste due to the connectivity issue.

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0:<NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:30:48:f8:72:b8 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.3/24 brd 192.168.0.255 scope global eth0
3: eth1: <BROADCAST, MULTICAST, UP, LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00.30:48:f8:72:b9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::23048ff:fef8:72b9/64 scope link
valid_lft forever preferred_lft forever
4: sit0: <NOARP>mtu 1480 qdisc noop
link/sit 0.0.0.0 brd 0.0.0.0


Thank you both for your suggestions!

From your first post it looks like you usually use eth0, is that correct? The eth0 connection has NO-CARRIER. Eth1 appears to be ipv6, and looks like it is connected.

Have you double checked and made sure you have ssh running on the problem box?
Code:
service ssh status
or, it CentOS5.5 is systemd
Code:
systemctl status ssh
 
1 members found this post helpful.
Old 08-07-2017, 05:41 PM   #8
fuzzyelbows
LQ Newbie
 
Registered: Aug 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TheEzekielProject View Post
From your first post it looks like you usually use eth0, is that correct? The eth0 connection has NO-CARRIER. Eth1 appears to be ipv6, and looks like it is connected.

Have you double checked and made sure you have ssh running on the problem box?
Code:
service ssh status
or, it CentOS5.5 is systemd
Code:
systemctl status ssh
eth0 is what seems to be running on the functional clusters, so I presume it is what is usually used. Although if eth1 does wind up working, I don't think anyone will complain!

When I attempted to run those commands, I got the following outputs:

service ssh status: --> ssh: unrecognized service

systemct1 status ssh --> command not found

I get the same responses when I try these on one of the functional machines.

Update: I have noticed that half of the boxes are actually running CentOS 5.3, if that changes anything. The outputs listed above are the same on boxes running 5.3 and 5.5. (Is a box what you call one unit of this system?)

Does this mean I have to install ssh? How do I get ssh if I can't connect to the internet to download it? (Presuming it's the kind of thing one can download- my friends tease me that up until last year I thought drivers were a physical object you had to put inside your computer. I'm not very knowledgeable about technology.)

Last edited by fuzzyelbows; 08-07-2017 at 05:43 PM. Reason: additional info
 
Old 08-07-2017, 05:45 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,608

Rep: Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168
Correct syntax is

Code:
service sshd status
 
Old 08-07-2017, 05:50 PM   #10
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 664

Rep: Reputation: 190Reputation: 190
Note that the second command
Code:
systemctl status ssh
is a lower-case "L" and not a 1 (one).
Also, I forgot to mention these commands need a root terminal.
 
Old 08-07-2017, 05:51 PM   #11
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 664

Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by michaelk View Post
Correct syntax is

Code:
service sshd status

On my non-systemd systems, sshd returns
Code:
sshd: unrecognized service
. But ssh works.
 
1 members found this post helpful.
Old 08-07-2017, 05:59 PM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 21,608

Rep: Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168Reputation: 4168
Depends on the distribution i.e RedHat/CentOS uses sshd while debian uses ssh.
 
Old 08-07-2017, 06:02 PM   #13
TheEzekielProject
Member
 
Registered: Dec 2016
Distribution: arch
Posts: 664

Rep: Reputation: 190Reputation: 190
Quote:
Originally Posted by michaelk View Post
Depends on the distribution i.e RedHat/CentOS uses sshd while debian uses ssh.
Ah. Good to know!
 
Old 08-07-2017, 08:08 PM   #14
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010Reputation: 1010
In your output for ifconfig it appears eth1 has no ipv4 address. Try giving it an ipv4 address on the same subnet as the network is on, i.e 192.168.0.0/24.

If that fails, try restarting the network service.

Last edited by AwesomeMachine; 08-07-2017 at 08:09 PM.
 
1 members found this post helpful.
Old 08-08-2017, 09:25 AM   #15
fuzzyelbows
LQ Newbie
 
Registered: Aug 2017
Posts: 5

Original Poster
Rep: Reputation: Disabled
Regarding the service codes for any future newbies on antiquated systems, openssh-daemon is running.


Quote:
Originally Posted by AwesomeMachine View Post
In your output for ifconfig it appears eth1 has no ipv4 address. Try giving it an ipv4 address on the same subnet as the network is on, i.e 192.168.0.0/24.

If that fails, try restarting the network service.

Giving eth1 an ipv4 address worked! c4 is now fully operational!

Thank you all very much for your help.

Last edited by fuzzyelbows; 08-08-2017 at 09:28 AM. Reason: needed to specify which part worked
 
  


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
CentOS 6 connect to host 10.1.93.101 port 50001: No route to host tim head Linux - Networking 2 08-16-2015 05:18 AM
ifconfig eth0 show errors saavik Linux - Networking 8 07-28-2010 06:30 AM
ifconfig eth0 doesnt show up dongmin Linux - Networking 16 05-02-2005 09:04 AM
eth0 doesn't show in Debian with ifconfig after dual boot with Mandrake9.2 steve1401 Linux - Networking 3 01-18-2004 05:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:33 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
Open Source Consulting | Domain Registration