Super User is a question and answer site for computer enthusiasts and power users. 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've broken the SSH on my Debian 6 VPS (no GUI). When I try and connect, I get the following message:

ssh: connect to host XXX port 22: Connection refused

I have no physical access to the machine. Is there another way I can connect to the machine using default Debian features? Telnet doesn't work

I must have made a typo in the SSH config file. Thanks

share|improve this question
Have you checked with the VPS provider to ensure there are no current problems on their end? They may also be able to provide some means/suggestions for resetting your password(s). – Ƭᴇcʜιᴇ007 Nov 26 '11 at 21:15
No, it's my fault. I changed the SSH config file and did a reboot but the service didn't come back :( – rstage Nov 26 '11 at 21:17
For the next time after you've reinstalled the server: Linux is not Windows. You don't need to reboot when changing a config file for a daemon. Just type /etc/init.d/ssh restart while you're logged in. Your session will not be closed, and you can try the new settings with a second ssh connection. – ott-- Nov 26 '11 at 21:23
That didn't work. Terminal said it couldn't find the file... I'm thinking I should have asked myself why before rebooting. – rstage Nov 26 '11 at 21:27
Look into /etc/init.d for something with ssh, that should be it. – ott-- Nov 26 '11 at 22:55
up vote 1 down vote accepted

Does your VPS provider offer a 'virtual console' to access the server? If so, use it!

If not, you might be able to open a trouble ticket with them and ask if they can get root access to fix the sshd config. Something like dpkg-reconfigure openssh-server.

share|improve this answer
Nice if you have Digital Ocean, Suicide if you have singlehop. – Adam F Oct 24 '14 at 17:14

You must log in to answer this question.

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