[SOLVED] centOS 5.5: eth0 and lo show up in ifconfig, but cannot use ssh? (No route to host)
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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
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
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
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?
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
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
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.
Regarding the service codes for any future newbies on antiquated systems, openssh-daemon is running.
Quote:
Originally Posted by AwesomeMachine
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.