-2

I believe I did something stupid here... Can you help me out? I just updated the config of my ssh server (changed the port). So I decided to restart the server: /etc/init.d/ssh restart.

Maybe there was a better idea, but what's done is done. Now here's the thing: apparently it didn't restart. I can't reach it, and I was the only guy with access to this server. Good thing: nothing critical is run on it.

But is there a way I can recover from such failure, or am I in for a full reinstall ?

5
  • Do you have access through other means, an OOB (out-of-band) console, like Dell's DRAC, HP's iLO, other...?
    – dawud
    Feb 9, 2014 at 20:11
  • I'm guessing that you neglected to update the firewall configuration too.
    – user9517
    Feb 9, 2014 at 20:22
  • Is there a chance SSH is running but a firewall is blocking your access to the new port?
    – sciurus
    Feb 9, 2014 at 20:24
  • Hmm... Good point... Now that you mention it, I seem to remember iptables rules that forbid port 22 :(
    – aspyct
    Feb 9, 2014 at 20:28
  • 2
    Even an ssh restart usually keeps the current server process running. So you should always test using a second window of your ssh client.
    – Marki
    Feb 9, 2014 at 21:25

2 Answers 2

2

How do you know that it failed to restart ?

Did you see any error messages somewhere or you are just guessing because you are not able to connect ?

My best educated guess is that, the ssh didn't fail to restart. It's just that you forgot to update the firewall to allow the traffic for that specific port to which you changed the SSH configs. That is what is blocking you from accessing that machine.

Simple update your firewall rules and it should be fine.

Thanx

6

Connect to it via the console instead of SSH and fix your SSH configuration.

8
  • Can't do: it's a remote remote server. No physical access.
    – aspyct
    Feb 9, 2014 at 20:27
  • 2
    Live and learn...
    – ewwhite
    Feb 9, 2014 at 20:29
  • 2
    No lights out management (ILO, DRAC, etc)? No KVM-over-IP? You should never have a server that you can't physically get to without lights out management.
    – MDMarra
    Feb 9, 2014 at 20:29
  • 1
    @ewwhite Linode provides OOB access to the "real" console, which is one of the reasons I choose them over many other providers.
    – EEAA
    Feb 9, 2014 at 20:53
  • 2
    Quite a few VPS hosts provide a web based fallback console - specifically for this sort of oopsie. Feb 10, 2014 at 6:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .