Skip to content

knirch/sshux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

sshux

Wrap SSH sessions in tmux

usage

sshux runs on the target system to which you have long running sessions. You know the ones, the one your collegue or friend smugly told you "you should have started screen or tmux" when you curse up a storm about losing work due to a network outage.

Add sshux to your .bashrc on the server;

/path/to/sshux-wrap && exit

The && exit is needed to leave the shell when you disconnect from/ or end a sshux session.

Now connect to your system and it should look just like normal. That's it.

If you connect to the system, sshux will attach to the first detached session in the sshux namespace, or create a new session.

sshux aims to be as unintrusive as possible, the tmux configuration aims to be as bare and non intrusive as possible. There's no prefix key, no status bars or anything. Use tmux in your shell to modify the current session if needed.

tweaking sshux

Pass variables when you ssh to the server to alter how sshux behaves. LC_ is abused as it's often in sshd's AcceptEnv configuration.

LC_SSHUX_DISABLE=1

Disables SSHUX for this session.

LC_SSHUX_FORCE_NEW=1

Create new session even if there are detached sessions available.

SSHUX_USE_LOCAL=1

Will wrap session even if SSH_CLIENT is empty. Useful if local terminals should be part of the sshux sessions.

extras/tmux

Convenience wrapper that strips TMUX if it matches sshux-wrapped. This can be used if you wish to spawn tmux sessions normally. If you wish to communicate with the sshux session, use -L sshux-wrapped.

About

Wrap SSH sessions in tmux

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages