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

This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine.
Koh Kut

I admit, I have not been on this web page in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. professionals. I thank you to help making people more aware of possible issues.
best weight loss foods

Incredible articles and extraordinary format. Your blog entry merits the greater part of the positive criticism it's been getting.

It would be ideal if you let me know in case you're searching for an article author for your site. You have some truly incredible posts and I feel I would be a decent resource. In the event that you ever need to take a portion of the heap off, I'd completely love to compose some material for your web journal in return for a connection back to mine. If it's not too much trouble send me an email if intrigued. Much obliged to you! text chat

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.
Descriptive Essay

A debt of gratitude is in order for posting this information. I simply need to tell you that I simply look at your site and I discover it extremely intriguing and instructive. I can hardly wait to peruse loads of your posts. architectural illustration

I am extremely delighted in for this web journal. Its a useful subject. It help me all that much to take care of a few issues. Its chance are so awesome and working style so rapid. Yacht Surveys

This is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again.
aliexpress

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.
justshortstories.com

Much obliged for offering pleasant data to us. i like your post and all you impart to us is uptodate and very instructive, i might want to bookmark the page so i can come here again to peruse you, as you have made a great showing. sales

Pages

Add new comment