Skip to content
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
executable file 13 lines (11 sloc) 322 Bytes
#!/usr/bin/env sh
# Author: Jochen Breuer <>
# License: The MIT License (MIT)
# This script will connect to an existing remote tmux session on the
# target server or open a new one.
if [ -z "$1" ]; then
echo "usage: $0 <hostname>";
exit 1;
$(which ssh) $1 -t "sh -c 'tmux a || tmux'";
exit $?