Skip to content

tryone144/wemux-login

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wemux-login

Work In Progress: This software may kill your kitten!

Replace your login-shell with wemux-login for your wemux-only ssh user.

Installation

From Source

  • Get this repository:
$ git clone https://github.com/tryone144/wemux-login
$ cd wemux-login
  • Build with cargo:
$ cargo build --release
  • Install into /usr/local/bin:
$ sudo install ./target/release/wemux-login /usr/local/bin/wemux-login

Configuration

  • Create a new user and group:
$ sudo groupadd -g 22423 wemux
$ sudo useradd -u 22423 -g 22423 -s /sbin/nologin -d /usr/local/share/wemux -c 'WEMUX Remote User' -m -N -G wemux wemux
$ sudo passwd wemux
  • Add wemux-login to /etc/shells as a valid login-shell:
$ echo "/usr/local/bin/wemux-login" | sudo tee -a /etc/shells
  • Add wemux-login as the default login-shell for this user:
$ sudo usermod -s /usr/local/bin/wemux-login wemux

Usage

  • Start a tmux/wemux session on the host:
$ wemux start
  • Connect to this remote session using ssh:
$ ssh -t wemux@remotehost pair

Advanced

  • Show a help message:
$ ssh wemux@remotehost help
  • List Remote sessions / servers:
$ ssh wemux@remotehost list
  • Connect to specific session / server SESSION:
$ ssh wemux@remotehost <mode> SESSION

Supported modes include:

Mode Description
mirror No interaction, i.e. read-only viewer. See wiki
pair Default tmux interactions. See wiki
rogue Not Supported! Independent session, i.e. free interaction. See wiki

See the wiki for a guide on how to use different sessions.

  • Disable or enable the wemux user:
# Disable user `wemux`
$ sudo usermod -L wemux
# Enable user `wemux` again
$ sudo usermod -U wemux
  • Alternative method using expiredate (see this post):
# Disable user `wemux`
$ sudo usermod --expiredate 1 wemux
# Enable user `wemux` again
$ sudo usermod --expiredate "" wemux

(c) 2018 Bernd Busse, The MIT License

Releases

No releases published

Packages

No packages published

Languages