I have an unmanaged dedicated server that I administer, running CentOS. Recently when I reboot the server, I am unable to use SSH. Both times this has happened the server host has determined the issue and explained it like this:

"Please check now - I'm not sure how and why but eth0 and eth1 were both active on boot (there should only be one). I've fixed this and rebooted the server which came up cleanly with network connectivity. If you have any application that could be making this change, kindly disable the same as well."

So in order for me to check into this myself, I am wondering where to look in order to see the settings he is describing there? That way I can configure it myself and try and determine if any programs are changing this.

Note: I have been using the 'reboot' command, could this be resetting the ONBOOT status?


cd into /etc/sysconfig/network-scripts. In there, you will find ifcfg-eth0 and ifcfg-eth1. Edit them, and set the ONBOOT line's values to yes and no, respectively. (Or vice versa, if it's eth1 you'd rather come up on boot.)

If you have to prevent the kernel from even attempting to touch the Ethernet hardware, you can pound out the eth1 line in /etc/modprobe.conf. Something like this:

#alias eth1 e1000

The e1000 bit will be the driver name; it varies depending on the hardware in the machine. You'll find the line without the # at the start; add it.

A better solution, if simply touching this hardware is a problem, is to remove access to it entirely at the hardware/VM level. If it's a VM, you'd remove it from the VM configuration. If it's real hardware, you'd disable the second Ethernet interface in the machine's firmware. (BIOS, EFI...)

  • Thank you. Everything looks correct, however my host says after I send a reboot command and the box comes back up it's stuck with both of them active. Is there any known/common thing that causes this to your knowledge? Or better yet, a way to track what process is making changes? – MetaGuru Jul 9 '12 at 15:38
  • That's very weird. I don't know why your hosting provider would give you access to hardware that causes them problems. Ultimately, removing access to the hardware is the best fix. Unless they've promised you access to it, in which case they need to fix their own problem. – Warren Young Jul 9 '12 at 15:59
  • I am not sure, all I know is that when both eth0 and eth1 are active on boot, it causes me problems with SSH. So based on your "#alias..." code, does that mean I can completely block eth1 from the kernel, but continue to allow eth0? I assume that linux treats them as two different pieces of hardware. – MetaGuru Jul 9 '12 at 16:25
  • They are two different pieces of hardware. Even if they're controlled by the same IC, they're controlled entirely separately. What you're doing by pounding out the modprobe line is telling the kernel you don't want it using that hardware. You should probably disable the kudzu service, too, if it's still enabled. You don't want eth1 being autodetected again. – Warren Young Jul 9 '12 at 16:37

Replacing with your eth0 IP address in /etc/ssh/sshd_config on the Listen line will prevent eth1 from being used by ssh.

  • Interesting, could this be a work around that would allow me to SSH in even if both are active? Then I can fix the problem myself at least. – MetaGuru Jul 9 '12 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.