I am running a Centos machine in Amazon cloud. Suddenly, I can't ssh into it. Fortunately, there is R Studio running that includes an ability to run BASH shell. So, I see in /var/log/boot.log that sshd failed to start.
When I run it from the command line sudo service sshd start
I get an error that Starting sshd: /etc/ssh/sshd_config: Permission denied
. I tried to set sshd_config permissions to either 644 or 600 - but I get the same error. Also I tried sudo su -
and then start service.
And it is not the limitation of the shell itself: I can start httpd without any problems.
I don't even know what else to try...
ls -ld /etc/ssh
? Is it executable?drwxr-xr-x. 2 root root 4096 Aug 24 02:05 /etc/ssh
sshd_config
should be chmoded to600
oru+rw,o=
. Make sure you check it usingls -l sshd_config
Also make sure that the problem is coming fromsshd_config
and not other misconfigured source.sshd
did not lose its sticky bit, too