I have really bad problem. Here is the background:
I have a vps and I tried to use svn, but it fauls badly. I found in one site that the problem disappears if you reinstall ssh client and I did it. And while I was on the server the problem has been fixed.
The problem: it turns out that now I cannot login anymore on that server. It says ssh:
connect to host myserver.com port 22: Connection refused
I suspect that when I reinstalled the ssh client the sshd server was uninstalled and the result is - no login.
What I have is FTP as well as PHP and I know root password. Is there any way I can install the openssh-server agan?
I ve tried following:
echo "MYPASSWORD" | /usr/bin/sudo -u root -S apt-get install -q openssh-server
and if I execute it in my local machine terminal it's working and it try to install sshd, but when I try to run it with php with:
exec('echo "MYPASSWORD" | /usr/bin/sudo -u root -S apt-get install -q openssh-server', $lines);
echo $lines;
it return nothing. I've tried with ls -la but the result is the same - on terminal it's ok, but from PHP it doesn't work.
Could you give me any advice how to solve that problem. It look like I need to turn into a hacker :)