Skip to content

Instantly share code, notes, and snippets.

@jacob-pro
Created February 2, 2023 00:04
Show Gist options
  • Save jacob-pro/47077006a1a7ceb5b1c3aeb9c0f36102 to your computer and use it in GitHub Desktop.
Save jacob-pro/47077006a1a7ceb5b1c3aeb9c0f36102 to your computer and use it in GitHub Desktop.

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
  1. On your server run:
sudo socat file:`tty`,raw,echo=0 tcp-listen:443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment