Created
September 23, 2025 15:36
-
-
Save genbtc/d481b2a13428423091e6592e110f5dc0 to your computer and use it in GitHub Desktop.
ssh-exec9.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # | |
| # Usage: ./ssh-exec9.sh alias1 alias2 ... aliasN (up to 9) | |
| # Opens multiple tabs of xfce4-terminal for many ssh connections (easy run on startup) | |
| # | |
| CMD=(xfce4-terminal) | |
| if [ $# -lt 1 ] || [ $# -gt 9 ]; then | |
| echo "Usage: $0 alias1 [alias2 ... alias9]" | |
| exit 1 | |
| fi | |
| for alias in "$@"; do | |
| CMD+=( | |
| --tab | |
| --title="$alias" | |
| --command="bash -ic 'ssh $alias'" | |
| ) | |
| done | |
| # Run it | |
| "${CMD[@]}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment