# SSH

If you are running the OnePub CLI tooling over an ssh connection then the `onepub login` command won't work.

Instead, you need to export the OnePub authentication Token from your PC and import it into the ssh session.

Exit your ssh session and run:

```bash
onepub login
onepub export
```

Note: you only need to run onepub login if you are not currently logged in.

Restart your ssh session and run:

```bash
onepub import --ask
```

When prompted for the ONEPUB\_TOKEN, enter the token displayed when you ran the `onepub export` command.

You are now logged in to OnePub on the remote server.


---

# Agent Instructions: 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:

```
GET https://docs.onepub.dev/guides/ssh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
