Accidentally disabled the Linux servers public network interface


Yes, I am crying as nothing is working. No ping or ssh. I accidental run ifdown eth0 command on CentOS Linux server. Is there any magic command to get the interface back up again and start sshing in? Am i doomed? Please help!

Not EC2 vm running with AWS. It is actual server in other city.

No need to panic. It happens. ifdown/ifconfig down is temporary and reboot the box. Once rebooted, your eth0 will come back online. Try:

  1. Call remote data center help desk and ask em to restart the server
  2. Some vendors have a browser-based tool to reboot the server. Again check with your data center or vendor portal.
  3. Do you have a remote console? Typically it is called BMC or ipmi. For example, all of our servers can be accessed via the ipmi client. The syntax is as follows to reboot the machine:
    ipmitool -U admin -P -I lanplus -H server_ip_address power soft
  4. You can try soft or reset or cycle option for ipmitool.

My CentOS Linux back online after they rebooted my server. It was so stressful. :sweat_smile:

Linux sysadmin blog - Linux/Unix Howtos and Tutorials - Linux bash shell scripting wiki