2016-03-06 19:14:08 +01:00
|
|
|
|
---
|
|
|
|
|
title: "Enabling public key authentication in CentOS"
|
|
|
|
|
date: 2015-02-13
|
|
|
|
|
lang: en
|
2016-07-06 22:31:36 +02:00
|
|
|
|
tags: [centos, ssh, authorized_keys, selinux]
|
2016-03-06 19:14:08 +01:00
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
If you are wondering why CentOS is ignoring your
|
|
|
|
|
`~/.ssh/authorized_keys` file for a user you created with an
|
|
|
|
|
interactive script or e.g. using Puppet – check that you restored the
|
|
|
|
|
SELinux context in the users home directory:
|
|
|
|
|
|
2016-03-07 13:41:08 +01:00
|
|
|
|
``` bash
|
2016-03-06 19:14:08 +01:00
|
|
|
|
$ restorecon -Rv /home/user/.ssh
|
|
|
|
|
```
|