> For the complete documentation index, see [llms.txt](https://docs.1kosmos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.1kosmos.com/authentication/passwordless-for-linux-ssh/faqs.md).

# FAQs

***

### Troubleshooting

<details>

<summary>A user cannot log in via SSH after PAM installation. Where do I start?</summary>

Check logs in this order:

1. 1Kosmos PAM logs: /var/log/blockId/blockId.log
2. SSHD system logs: journalctl -t sshd -r
3. SELinux audit logs (if SELinux is enabled): ausearch -m avc -ts recent

</details>

<details>

<summary>PAM configuration seems correct but SSH login is still failing. What could be wrong?</summary>

Verify that no auth rule in password-auth or sshd has a control flag of sufficient or success=done — these bypass subsequent PAM rules including 1Kosmos. Also confirm the sshd service has been restarted after any configuration changes.

</details>

<details>

<summary>SELinux is blocking the 1Kosmos PAM. How do I fix it?</summary>

Set SELinux to permissive mode (setenforce 0), SSH into the host to generate audit logs, create a semodule using audit2allow, install it with semodule -i, then re-enable enforcing mode (setenforce 1). See the Installation page for the full steps.

</details>

<details>

<summary>I made changes to the PAM files and locked myself out. What should I do?</summary>

This is why it is recommended to keep an additional root shell open before making changes. If you are locked out, you will need console access to the host to revert the PAM file changes from the backup you created before modifying them.

</details>

### Useful Commands

<details>

<summary>What are the key commands for managing the sshd service?</summary>

| Task                              | Command                |
| --------------------------------- | ---------------------- |
| Check sshd status                 | systemctl status sshd  |
| Stop sshd                         | systemctl stop sshd    |
| Start sshd                        | systemctl start sshd   |
| Restart sshd                      | systemctl restart sshd |
| Check SELinux status              | sestatus               |
| Disable SELinux (current session) | setenforce 0           |
| Enable SELinux (current session)  | setenforce 1           |

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.1kosmos.com/authentication/passwordless-for-linux-ssh/faqs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
