-
-
Save wwalker/165776b828f9be646bce4e5f6bc4479a to your computer and use it in GitHub Desktop.
confused ssh tmux interaction
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
TL;DR - Solved it. $HOSTNAME isn't set in interactive shh session | |
wwalker@polonium:~ ✓ $ head ~/.tmux.conf | |
#new -s $HOSTNAME | |
set-hook -g session-created "rename-session $HOSTNAME" | |
#rename-session $HOSTNAME | |
# This works: | |
wwalker@serenity:~ ✓ $ ssh polonium | |
Last login: Sat Dec 7 12:20:35 2019 from 172.16.16.119 | |
wwalker@polonium:~ ✓ $ tmux | |
# tmux opens and if there isn't already a session named polonium the new session is name polonium | |
# This does NOT work | |
wwalker@serenity:~ ✓ $ ssh -t polonium tmux | |
# opens tmux but with this error at the top | |
# /home/wwalker/.tmux.conf:2: usage: rename-session [-t target-session] new-name [0/0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment