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

link|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). – techie007 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 :( – mradbourne Nov 26 '11 at 21:17
4  
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. – mradbourne 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
show 1 more comment
feedback

1 Answer

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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