# Single pomerium-cli running multiple connections?

**URL:** <https://discuss.pomerium.com/t/single-pomerium-cli-running-multiple-connections/110>\
**Category:** Support\
**Created:** [April 27, 2022, 12:29pm UTC](https://discuss.pomerium.com/t/single-pomerium-cli-running-multiple-connections/110 "2022-04-27T12:29:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ms1111](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@ms1111](https://discuss.pomerium.com/u/ms1111)\
**Post date:** [April 27, 2022, 12:29pm UTC](https://discuss.pomerium.com/t/single-pomerium-cli-running-multiple-connections/110/1 "2022-04-27T12:29:00Z")

</div>

Hi, I’m wondering if any thought’s been given to having a single instance of pomerium-cli that could handle multiple TCP connections at a time.

For example, if you have an internal development server with services on a few different ports (database, SSH, etc.), it’d be handy to give users a single command they can run to open those ports all at once, and CTRL+C when they’re done.

```auto
pomerium-cli tcp host1.internal.example.com:22 --listen :2022 \
    host1.internal.example.com:5432 --listen :55432 \
    host2.internal.example.com:12345 --listen :12345

```

As a single process, theoretically it could even cache authentication across the services so the user would only need to authenticate once.

As it stands now I’d have to give them a script that launches a couple of instances of pomerium-cli in the background, which will look confusing and make it harder for them to shut them all down.

## What’s your environment like?

- Pomerium version (retrieve with `pomerium --version`): 0.17.2
- Server Operating System/Architecture/Cloud: Ubuntu 20.04

---

<div class="post-metadata">

**Author:** ![denis](https://avatars.discourse-cdn.com/v4/letter/d/5e9695/32.png) [@denis](https://discuss.pomerium.com/u/denis)\
**Post date:** [April 27, 2022, 10:30pm UTC](https://discuss.pomerium.com/t/single-pomerium-cli-running-multiple-connections/110/2 "2022-04-27T22:30:54Z")

</div>

If you’re in the GUI environment, you may use pomerium desktop-client where you may click through the connections you want to listen to.

Desktop client allows you to export a (subset) of connections as a JSON file.

It might be possible to make CLI consume that configuration and start all listeners automatically.

Do you mind opening a ticket in [GitHub - pomerium/cli: Pomerium CLI](https://github.com/pomerium/cli) ?

---

<div class="post-metadata">

**Author:** ![ms1111](https://avatars.discourse-cdn.com/v4/letter/m/43a26b/32.png) [@ms1111](https://discuss.pomerium.com/u/ms1111)\
**Post date:** [April 28, 2022, 7:10pm UTC](https://discuss.pomerium.com/t/single-pomerium-cli-running-multiple-connections/110/3 "2022-04-28T19:10:26Z")

</div>

Thanks Denis, good pointer on the desktop client, I’ll try that! I didn’t realize it had an export/import function.

And I’ve opened a feature request for the CLI: [Handle TCP connections in a single command invocation · Issue #58 · pomerium/cli · GitHub](https://github.com/pomerium/cli/issues/58)
