Re:SSH hacks – a little sanity for remote workers
by xelxebar on Wednesday April 29, 2020 @11:18PM
(#23027097)
A combination of `RemoteCommand` and `RequestTTY` should do the trick:
The problem is that this will mess up your one-off command invocations of ssh, git ssh connections, etc:
However, we can use `Match` blocks to get around that! There are a thousand ways to skin this cat, but one way is to use an environment variable, here `t` for "tmux". Put this at the end of your config:
and the following Just Work, reattaching tmux sessions as necessary:
[ Parent
| on HN ]
Re:SSH hacks – a little sanity for remote workers
by mmalone on Wednesday April 29, 2020 @11:41PM
(#23027192)
Nice. `Match exec` is one of my favorite things. It's too bad the command being passed to `ssh` (if there is one) isn't available as a `TOKEN` (as far as I can tell). That would put a bow on everything.