Skip to content

Instantly share code, notes, and snippets.

@jacob-pro
Created February 2, 2023 00:04
Show Gist options
  • Select an option

  • Save jacob-pro/47077006a1a7ceb5b1c3aeb9c0f36102 to your computer and use it in GitHub Desktop.

Select an option

Save jacob-pro/47077006a1a7ceb5b1c3aeb9c0f36102 to your computer and use it in GitHub Desktop.

Revisions

  1. jacob-pro created this gist Feb 2, 2023.
    20 changes: 20 additions & 0 deletions shell.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    # How to create interactive shell into a CI Build Runner:

    1. Create a publicly accessible server
    2. Ensure firewall on the instance incoming port 443
    3. Add a build step:
    ```
    wget https://github.com/andrew-d/static-binaries/raw/master/binaries/linux/x86_64/socat -O ~/socat
    chmod +x ~/socat
    while :
    do
    echo "Attempting to connect"
    ~/socat exec:'bash -li',pty,stderr,setsid,sigint,sane tcp:${INSTANCE_IP}:443
    done
    ```

    4. On your server run:
    ```
    sudo socat file:`tty`,raw,echo=0 tcp-listen:443
    ```