Skip to content

Instantly share code, notes, and snippets.

@b23prodtm
Last active April 13, 2025 09:34
Show Gist options
  • Save b23prodtm/b08f58c5d0474902fd3e4bbbaf95aa2e to your computer and use it in GitHub Desktop.
Save b23prodtm/b08f58c5d0474902fd3e4bbbaf95aa2e to your computer and use it in GitHub Desktop.
Balena Engine connect to your favorite container terminal
#!/usr/bin/env bash
[ $# -lt 3 ] && echo "Usage: $0 <port> <user@host> <container-name>" && exit 0
ssh -vttp "$1" "$2" "balena exec -it \$(balena-engine ps | grep \"${3}\" | awk '{print \$1}') /bin/sh"
@b23prodtm
Copy link
Author

ssh -ttp
if you want to disable verbosity from SSH

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