Created
July 30, 2021 04:06
-
-
Save kclejeune/ee7337cfd18750dff724a60883be3941 to your computer and use it in GitHub Desktop.
tmux auto config for hpc over ssh
This file contains 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
# if we're in an interactive ssh shell and NOT in a tmux shell, reconnect or create an ssh_tmux session | |
if [[ $- == *i* ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then | |
# tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux | |
tmux new-session -A -s ssh_tmux | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment