Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 14 lines (11 sloc) 322 Bytes
#!/usr/bin/env sh
# Author: Jochen Breuer <brejoc@gmail.com>
# 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;
fi
$(which ssh) $1 -t "sh -c 'tmux a || tmux'";
exit $?