Comment 1 for bug 1821790

Revision history for this message
Michele Baldessari (michele) wrote :

Seems the issue is that ~tripleo-admin/.ssh/authorized_keys gets created with the container_t context and then ssh to localhost then fails:
[root@undercloud-0 ~]# ls -laZR /home/tripleo-admin/.ssh/
/home/tripleo-admin/.ssh/:
total 12
drwx------. 2 tripleo-admin tripleo-admin unconfined_u:object_r:ssh_home_t:s0 61 Mar 26 18:02 .
drwx------. 3 tripleo-admin tripleo-admin unconfined_u:object_r:user_home_dir_t:s0 74 Mar 26 17:12 ..
-rw-------. 1 tripleo-admin tripleo-admin system_u:object_r:container_file_t:s0:c85,c195 830 Mar 26 18:02 authorized_keys
-rw-------. 1 tripleo-admin tripleo-admin unconfined_u:object_r:ssh_home_t:s0 1864 Mar 26 17:12 id_rsa
-rw-r--r--. 1 tripleo-admin tripleo-admin unconfined_u:object_r:ssh_home_t:s0 428 Mar 26 17:12 id_rsa.pub

After I run a forced relabel:
[root@undercloud-0 ~]# restorecon -Rv /home/tripleo-admin/.ssh/
/home/tripleo-admin/.ssh/authorized_keys not reset as customized by admin to system_u:object_r:container_file_t:s0:c85,c195
[root@undercloud-0 ~]# restorecon -RvF /home/tripleo-admin/.ssh/
Relabeled /home/tripleo-admin/.ssh/authorized_keys from system_u:object_r:container_file_t:s0:c85,c195 to unconfined_u:object_r:ssh_home_t:s0

The deploy continued