Vds
ISP: hetzner.com.
OS: Ubuntu 14.04 Trusty Tahr.

I configured OpenSSH in such a way as to restrict users belonging to a specific group in their personal space (via Subsytem sftp). Guided by this recipe. Created a group, added users (fortunately not all), defined ChrootDirectory% h. I restart (at the same time I'm sitting as root), well, it issues accordingly that the host has closed the connection.

ssh example.com -l developer 

What I get is ssh: connect to host example.com port 22: Connection refused. Under the root forbidden to sit on sftp, ftp and ssh. It is clear that he hurried, did not tune out. But how would I connect to the server now? Already tried everything: rlogin, telnet, sftp. I do not even know what else to try. More like and not through that. Unfortunately, I don’t have access to my ISP account, but the person who has it now on vacation. I would like to cope with the situation without contacting support, and where I’m not going to dig my mind. Now I regret not having set webmin.

  • 3
    Do you have ftp there? Log in via ftp, add the script to it (php for example), which will make su -c reboot with expect and root password. go to the url of this script and enjoy the reboot. --- Next time, restart ssh in the screenshot. - zb '
  • 2
    Here is how to do it if there is no expect serverfault.com/a/580813/88690 - zb '

1 answer 1

In general, by popular self-education, namely, by the method of scientific typing and all sorts of googling on the topic, nothing happened. All services that were involved on the server, I covered thoroughly so that he himself could not get. I had to “catch” the password from the hetzner panel from the holiday-maker and correct the situation in Rescue Mode. The idea with the script, expressed by eicto is by the way an idea, I will test it inapplicable soon. From now on, I will write such questions on the rtcode, just out of habit published here. And of course, the following advice will be used by console screen multiplexer or analogues. Thank.