0

I have a new web-admin and he mistakenly ran chmod -r 755 /etc to try and disallow our shell users from reading any other files. As a result, SSH on our server does not work. How can we fix this?

  • 5
    Do note that your situation is more serious than just sshd not running. You'll really want to fix the other permissions as well. (Just as an example, have a look at /etc/shadow) – Håkan Lindqvist Mar 13 '15 at 05:47
  • 1
    You should read this http://serverfault.com/questions/364677/why-is-chmod-r-777-destructive @HåkanLindqvist is correct. There may be some help in http://serverfault.com/search?q=repair+777 but it's probably best to reinstall. – user9517 Mar 13 '15 at 06:54

1 Answers1

3

You need to make the ssh server keys only readable by root again:

chmod 600 /etc/ssh/ssh_host_*_key

may do the job

  • 1
    This worked! Thank you so much! If you have a BTC address, I'd be more than glad to send some your way :D – arestifo Mar 13 '15 at 05:15