Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was trying to get my dedicated server to have a couple of VPS's installed using this tutorial:

In the process I had to change a file: /etc/ssh/sshd_config

The documentation advises to change it into:

ListenAddress <host IP address>

Guess what? I literally added <host IP address> instead of the dedicated servers IP. I restarted the server and now I'm not able to access my SSH anymore. Can anyone help me to gain access to my SSH again?

I'm using CentOS 6.

share|improve this question
up vote 4 down vote accepted

The problem here is that sshd fails to start due to invalind configuration.

You have to ask your dedicated server hosting provider if they have a way to attach a network accessible console to the server.

This way you can use the console to fix your sshd_config, and then restart sshd.

If your hosting provider does not have remote console available, then you have to give them your credentials so they can fix the sshd_config.

To mount the root partition, you need to know the partition setup. If you don't already know about it, you can find the information with fdisk -l.

This gives out a list of partitions available on all hard disks. Then, you should be able to find out where the root partition is.

Then you can mount root partition with this command:

mount /dev/sda1 /mnt

This assumes root partition is in first hard disks first partition, so replace /dev/sda1 with the proper partition.

If you have Linux software RAID in use, then the first parameter is /dev/mdX, where X is the number of the MD device.

If you have LVM in use, then the first parameter is /dev/mapper/LVMLABEL. Here you can find LVMLABEL by using lvs command.

share|improve this answer
Depending on the hoster, they might offer rescue systems you can boot into to fix this. In the best case, it's a real server with built-in remote management. – Sven Jun 8 '14 at 16:38
Good addition, thanks! – Tero Kilkanen Jun 8 '14 at 16:40
They do, I started the server in rescue mode. But how do I mount it or something so I can get my system files and change the sshd_config back? (OVH btw) – Arnold Jun 8 '14 at 16:55
Thank you! I'm rebooting my server now I its fixed. – Arnold Jun 8 '14 at 17:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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