0

I'm having a problem on my remote server (which is in another city) and I can't access it with SSH. I can see that port 80 and 443 is open, but port 22 isn't. I could only assume that sshd didn't start correctly.

I'm now in the system through a rescue disk. Should adding those lines to rc.local

update-rc.d ssh defaults
/etc/init.d/sshd start

get those commands to run at startup? Or is there something else to be done other than adding them?

Thank you.

The Quantum Physicist
  • 770
  • 4
  • 18
  • 36

1 Answers1

1

Yes. In that you use it to process start-up actions.

So in your example you would open your file using:

sudo nano /etc/rc.local

Just above where it says exit; add the line:

/etc/init.d/ssh start

EDIT: Also ensure the open port directed at your server is listed in /etc/ssh/sshd_config