Skip to content

the built-in exec command break ssh ProxyJump #3703

Closed

Description

@jarod

Describe the bug
with ~/.ssh/config

Host my.target.server
        ProxyJump [email protected]:22
❯ ssh my.target.server
error: exec unexpected -l
  ┌─ shell:1:11
  │
1 │ exec ssh -l jarod -p 22 -W '[my.target.server]:22' my.proxy.server
  │           ^ unexpected flag (try exec -h)

kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535

Activity

  1. github-actions commented on Sep 27, 2021

    @github-actions

    This issue is being marked stale because it has been open for 90 days without activity. If you feel that this is in error, please comment below and we will keep it marked as active.

  2. github-actions commented on Oct 8, 2021

    @github-actions

    This issue has been marked stale for more than 10 days without activity. Closing this issue, but if you find that the issue is still valid, please reopen.

  3. fdncred commented on Oct 15, 2021

    @fdncred
    Contributor

    this issue comes up frequently. better exec support is needed.

  4. alechp commented on Oct 25, 2021

    @alechp

    exec kubectl exec -i -t -n default foobar -c baz "--" sh -c "clear; (bash || ash || sh)"

    Auto-generated lens command fails for same reason. Not quite sure how to work around this (besides temporary chsh)

  5. kubouch commented on Oct 26, 2021

    @kubouch
    Contributor

    @alechp Try wrapping the flags into quotes or double quotes, like this: exec kubectl exec '-i' '-t' ....

  6. sophiajt commented on Oct 26, 2021

    @sophiajt
    Contributor

    @kubouch this feels like it would need some parser changes to get better support. Might be a good candidate for adding to engine-q's parser

  7. kubouch commented on Oct 26, 2021

    @kubouch
    Contributor

    @jntrnr Yeah, I was thinking it could be a parser keyword and we would pass everything after exec program as arguments to program, no matter what.

  8. alechp commented on Oct 26, 2021

    @alechp

    @alechp Try wrapping the flags into quotes or double quotes, like this: exec kubectl exec '-i' '-t' ....

    That resolved it. Thank you!
    Screen Shot 2021-10-26 at 8 26 16 AM

  9. kubouch commented on Oct 27, 2021

    @kubouch
    Contributor

    I'll close this issue since there is an older one open already on this topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions