Skip to content

Instantly share code, notes, and snippets.

@genbtc
Created September 23, 2025 15:36
Show Gist options
  • Select an option

  • Save genbtc/d481b2a13428423091e6592e110f5dc0 to your computer and use it in GitHub Desktop.

Select an option

Save genbtc/d481b2a13428423091e6592e110f5dc0 to your computer and use it in GitHub Desktop.
ssh-exec9.sh
#!/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