I made a mistake in
/etc/sshd_config so have locked myself out of my remotely hosted server running Centos 6.
It's running Apache and I have FTP access to
/var/www and I know the root password.
To try to restore
sshd_config I have tried creating a PHP page with a few
passthru() commands - these run as user
apache. I have tried:
echo "password" | su -c "cp -f sshd_config /etc/sshd/sshd_config"
but that didn't work.
expect is not installed on the server.
Does anyone know a way of resolving this?