After recently discovering tmux and Tmuxinator, I've been trying to set up a development environment to use.
Per protocol, we aren't allowed to store passwords/passphrases in scripts. So what I'm looking for is a wait for tmux to wait for the SSH tunnel to get set up (password supplied, enter pressed, and logged in).
I know that there's a "wait-for" command in tmux 1.8+. I'm running 1.9a via Cygwin. But even though I've read over the documentation, I'm just having a difficult time understanding it.
tmux new-session -s development -n editor -d
tmux split-window -v
tmux split-window -v
"Need to send to all panes.
tmux send-keys -t development 'ssh [email protected]' C-m
So, here's a very simple version of what I have.
Thoughts? I know I can synchronize-sessions, I'm still working out the kinks in this.
Edit: Looking into commands, and pulling variables from the pane to the command from synchronized-panes. This might be a "better" way to go about, until I can figure out how to get TMUX to prompt me for user-input.
Might issue a feature request.
~/.ssh/config
file: putHost foo
,User user
andHostname example.com
on three consecutive lines in the config file. Thenssh foo
becomes equivalent tossh [email protected]
. // Maybe something like this helps, too:command-prompt -p 'log in as:' -I '[email protected]' 'split-window -v -d %1; split-window -v -d %1'