> Markdown version of https://tuna.am/en/docs/cli/ssh/. Documentation index: [llms.txt](https://tuna.am/en/llms.txt), full text in one file: [llms-full.txt](https://tuna.am/en/llms-full.txt). Any page is available as Markdown: append `.md` to its URL without the trailing slash.

# tuna ssh

Start an SSH server.

Guide with examples: [SSHd](https://tuna.am/en/docs/tunnels/ssh.md).

Usage

```bash
tuna ssh [flags]

```

Examples

```bash
tuna ssh
tuna ssh --auth="*:pass"
tuna ssh --auth="user:pass"
tuna ssh --password-auth=false
tuna ssh --port=ssh
tuna ssh --port=35000
tuna ssh --user-shell-env=false

```

| Flag                  | Description                                                                           |
| --------------------- | ------------------------------------------------------------------------------------- |
| `--api-key string`    | Your tuna.am api key with the tunnels:connect scope (env `TUNA_API_KEY`).             |
| `--auth string`       | Add static authentication (e.g. user:pass). Can be repeated.                          |
| `--cidr-allow string` | Reject connections that do not match the given CIDRs. Can be repeated.                |
| `--cidr-deny string`  | Reject connections that match the given CIDRs. Can be repeated.                       |
| `--password-auth`     | Enable or disable password authentication. Default: `true`.                           |
| `-p, --port string`   | Port for incoming connections.                                                        |
| `--record-session`    | Save SSH session to disk. Default: `true`.                                            |
| `--upload`            | Automatically upload sessions on completion.                                          |
| `--user-shell-env`    | Start user's login shell with full environment (home dir, rc files). Default: `true`. |

[Global flags](https://tuna.am/en/docs/cli.md#global-flags) work too.
