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?
Asked
Active
Viewed 1,242 times
0
arestifo
- 11
- 1
-
5Do 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
-
1You 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 Answers
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
Craig Miskell
- 4,086
- 1
- 15
- 16
-
1This 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