diff --git a/app/views/unattended/provisioning_templates/snippet/remote_execution_ssh_keys.erb b/app/views/unattended/provisioning_templates/snippet/remote_execution_ssh_keys.erb index f898128682e0..43fc6acefe31 100644 --- a/app/views/unattended/provisioning_templates/snippet/remote_execution_ssh_keys.erb +++ b/app/views/unattended/provisioning_templates/snippet/remote_execution_ssh_keys.erb @@ -52,6 +52,7 @@ EOF chmod 0700 <%= ssh_path %> chmod 0600 <%= ssh_path %>/authorized_keys chown -R <%= "#{ssh_user}:" %> <%= ssh_path %> + chown -R <%= "#{ssh_user}:" %> <%= "~#{ssh_user}" %> # Restore SELinux context with restorecon, if it's available: command -v restorecon && restorecon -RvF <%= ssh_path %> || true