pyratelog

personal blog
git clone git://git.pyratebeard.net/pyratelog.git
Log | Files | Refs | README

commit a1319e389bbab28bd438dc512d32f7475f817fbf
parent 8fb3f1bdb9e643ab1ae2aca3d93f72053becf75e
Author: pyratebeard <root@pyratebeard.net>
Date:   Thu, 31 Mar 2022 23:41:31 +0100

this_ssux

Diffstat:
Mentry/this_ssux.md | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/entry/this_ssux.md b/entry/this_ssux.md @@ -6,7 +6,7 @@ As a sysadmin I rely heavily on ssh. Even with moving a lot of my work to Infra A long time I was in the habit of starting a screen when I logged onto a system so that if my connection dropped I didn't lose what I was doing, as well as being able to open new shells within the same session. -Then I moved to installing tmux on my systems and started a tmux session when I logged on. After a while this became an function in my `zsh` [alias file](https://git.pyratebeard.net/dotfiles/file/zsh/.zsh/aliases.zsh.html#l181){target="_blank" rel="noreferrer"}, which I use in place of ssh +Then I moved to installing tmux on my systems and started a tmux session when I logged on. After a while this became an function in my zsh [alias file](https://git.pyratebeard.net/dotfiles/file/zsh/.zsh/aliases.zsh.html#l181){target="_blank" rel="noreferrer"}, which I use in place of ssh ``` ssux () { TERM=screen ssh -t "$@" 'tmux attach || tmux new' || ssh "$@" @@ -24,7 +24,7 @@ I have seen a couple of different methods of doing something similar using setti I was using this a lot in work and decided to add hostname autocompletion to make my life easier. You can see the completion script in my [dotfiles](https://git.pyratebeard.net/dotfiles/file/zsh/.zsh/completion/_ssux.html){target="_blank" rel="noreferrer"}. -Living inside a tmux session then using tmux over ssh meant I had to use two different prefix options. I didn't like this. I use the backtick (```) as my prefix in tmux, I find it to be really convenient. I wanted to use the same backtick prefix on my remote sessions. This worked if I hit backtick twice before the command I wanted to send to the remote, or "second" session. +Living inside a tmux session then using tmux over ssh meant I had to use two different prefix options. I didn't like this. I use the backtick (`) as my prefix in tmux, I find it to be really convenient. I wanted to use the same backtick prefix on my remote sessions. This worked if I hit backtick twice before the command I wanted to send to the remote, or "second" session. With a bit of internet searching I found a discussion on the [tmux Github page](https://github.com/tmux/tmux/issues/237){target="_blank" rel="noreferrer"} regarding a toggle option. I also came across [bnorick's tmux.conf](https://github.com/bnorick/tmux-config/blob/master/tmux/tmux.conf#L368){target="_blank" rel="noreferrer"} with a toggle for nested sessions.