Can't connect with ssh and sshd complains about permissions on authorized_keys files

I was recently trying to connect to a CentOS box from Windows and had the following error in /var/log/secure (after enabling DEBUG3 level logging in /etc/ssh/sshd_config):

Dec 19 18:01:05 hostname sshd[25119]: debug1: trying public key file /root/.ssh/authorized_keys
Dec 19 18:01:05 hostname sshd[25119]: debug1: Could not open authorized keys '/root/.ssh/authorized_keys': Permission denied

It's an SELinux problem, and I don't quite understand it, but here's the one-liner that fixes it:

restorecon -FRvv ~/.ssh

Found on stackoverflow: "SSHD Gives error could not open Authorized Keys, although permissions seem correct"

Tags: 

Comments

Nice blog, Your work is great and i like you and hopping for some more nice posts. Continue writing such a nice blog. All paragraphs are described clearly and also give the good solution for the readers. I completed this post within a second and it is not boring. I will share this post to my friends and the others.I am sure all people will get new ideas and information from this article.

It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing.
Housewash

very interesting post.this is my first time visit here.i found so many interesting stuff in your blog especially its discussion..thanks for the post!

Thanks for sharing nice information with us. i like your post and all you share with us is uptodate and quite informative, i would like to bookmark the page so i can come here again to read you, as you have done a wonderful job.
click here

Thanks for posting this info. I just want to let you know that I just check out your site and I find it very interesting and informative. I can't wait to read lots of your posts.
read more

In the UK a court order was given in April 2015 to ISPs to block URLs that provided either the Popcorn Time application software (PTAS) or “sources of update information” (SUI) – i.e. pointers to torrent-indexing sites. popcorn flix

You have done a great job on this article. It’s very readable and highly intelligent. You have even managed to make it understandable and easy to read. You have some real writing talent. Thank you.
peptide

Marvelous and fascinating article. Incredible things you've generally imparted to us. Much obliged. Simply keep making this kind out of post. porn cccam server

Positive site, where did u come up with the information on this posting?I have read a few of the articles on your website now, and I really like your style. Thanks a million and please keep up the effective work.
http://bavolex.com/

Pages

Add new comment