> 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

This page covers common troubleshooting scenarios and useful commands for managing the 1Kosmos Linux PAM.

***

### 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
