-2

My sshd is refusing to restart because of the following error:

@ WARNING: UNPROTECTED PRIVATE KEY FILE! @

However, i cant figure out how to delete the unsafe ssh keys without having the ssh access. What to do?

user2806026
  • 787
  • 3
  • 10
  • 24
  • Do you have console access? – kometen Jan 12 '16 at 09:21
  • No. That seems to be faulty as wel.. – user2806026 Jan 12 '16 at 09:22
  • Is it a local or remote machine? :-) What type of OS is it? Linux? – kometen Jan 12 '16 at 09:25
  • Remote machine running Whm/Cpanel/CentOS – user2806026 Jan 12 '16 at 09:25
  • My console doesnt seem to recognize my root user :s – user2806026 Jan 12 '16 at 09:30
  • Are you still logged in? Or do you get the error message via som web based tool? Root may be disabled by default. Have you tried the sudo command? Use your user password if asked. – kometen Jan 12 '16 at 09:33
  • I can usually login to the server via a web console tool from my hosting provider. However, this now tells me that the login is incorrect. – user2806026 Jan 12 '16 at 09:35
  • How do you see this message? We most typically see it, when the *client* authentication key file is readable for anyone but the owner. The key file's name is listed in the following line, that you didn't show us. If it is indeed one of the server keys, how can you see the output from sshd but not able to interpret the boot process? Please don't hide information that is essential to understand the problem. – chexum Jan 12 '16 at 10:33
  • I see the error when trying to restart ssh through WHM. Which more information do you need? – user2806026 Jan 12 '16 at 10:35
  • Stackoverflow is for help with software development. Questions about running an ssh server aren't really on topic. You should consider asking this on http://unix.stackexchange.com/. I don't think http://serverfault.com/ accepts question about servers administered through cpanel and similar tools. – Kenster Jan 12 '16 at 14:52

1 Answers1

0

You need to chmod 600 ~/.ssh/rsa_key. This protects the keyfile from other users on the same system beeing able to read/steal it.

Daniel W.
  • 31,164
  • 13
  • 93
  • 151