# fly ssh console -C "cmd" fails

**URL:** <https://community.fly.io/t/fly-ssh-console-c-cmd-fails/11555>\
**Category:** Questions / Help\
**Tags:** login-only\
**Created:** [March 17, 2023, 8:39pm UTC](https://community.fly.io/t/fly-ssh-console-c-cmd-fails/11555 "2023-03-17T20:39:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![123](https://avatars.discourse-cdn.com/v4/letter/1/7feea3/32.png) [@123](https://community.fly.io/u/123)\
**Post date:** [March 17, 2023, 8:39pm UTC](https://community.fly.io/t/fly-ssh-console-c-cmd-fails/11555/1 "2023-03-17T20:39:04Z")

</div>

`fly ssh console`, and then running `"cmd"` on the console (without -C) works, but when using -C it doesn’t work. I was running fly version 0.0.450, and that would hang when using -C and stdin exceeded 21 lines of input. Upgrading fly to version 0.0.492 fixed that hang, but using -C still fails to work

I.e. currently `cat file | fly ssh console -C "cmd"` fails to give the proper output

But `fly ssh console`, and then by hand running “cmd” on the console and pasting in the contents of `file` does work

The `"cmd"` is `fossil test-http repos/myrepo.fossil`, where `repos/myrepo.fossil` is a path to an existing repo. I’m trying to get `fossil sync` to work over ssh, so my local repos get automatically duplicated onto a remote fly volume

It may be helpful to add: the file is an http request from fossil, that looks like this:

```auto
POST repos/myrepo.fossil HTTP/1.0
Host: backup.fly.dev
User-Agent: Fossil/2.22 (2023-03-15 12:42:54 [68e9acb836])
X-Fossil-Transport: SSH
Content-Type: application/x-fossil-debug
Content-Length: 3061

pragma client-version 22200 20230315 124254
pull e43ba024de2283b65eac223c6b099a32961c884c 42ac6619f5701e04c85c9604367254cc5d53c6ed
push e43ba024de2283b65eac223c6b099a32961c884c 42ac6619f5701e04c85c9604367254cc5d53c6ed
...

```

But when using -C, it seems to become this:

```auto
POST repos/myrepo.fossil HTTP/1.0

Host: backup.fly.dev

User-Agent: Fossil/2.22 (2023-03-15 12:42:54 [68e9acb836])

X-Fossil-Transport: SSH

Content-Type: application/x-fossil-debug

Content-Length: 3061

pragma client-version 22200 20230315 124254
pull e43ba024de2283b65eac223c6b099a32961c884c 42ac6619f5701e04c85c9604367254cc5d53c6ed
push e43ba024de2283b65eac223c6b099a32961c884c 42ac6619f5701e04c85c9604367254cc5d53c6ed
...

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/fly1/original/3X/6/e/6e8955d00cb218e186ebbe3a6ab06fefdce15290.svg) [@system](https://community.fly.io/u/system)\
**Post date:** [March 24, 2023, 8:39pm UTC](https://community.fly.io/t/fly-ssh-console-c-cmd-fails/11555/2 "2023-03-24T20:39:35Z")

</div>

Closed on March 24, 2023, 8:39pm UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
