---
title: "pols ssh"
description: "Open an SSH session in a sandbox through the SSH gateway"
---

<!-- Generated by scripts/reference.mjs from the pols CLI's --help. Do not edit; run `npm run reference:sync`. -->

Run ssh to the sandbox through the pols SSH gateway (ssh \<sandbox\>@ssh.pols.so),
as the sandbox user. Register your public key first with `pols ssh-key add`.
Arguments after `--` are the remote command. Use `--print` for the plain ssh
command, to add your own ssh options, scp or sftp.

## Usage

```text
pols ssh SANDBOX [-- COMMAND...] [flags]
```

## Examples

```sh
pols ssh-key add ~/.ssh/id_ed25519.pub
pols ssh web
pols ssh web -- uname -a
pols ssh web --print
```

## Flags

```text
-h, --help    help for ssh
    --print   print the ssh command instead of running it
```

The [global flags](/reference/cli/#global-flags) work with this command too.
