-1

I'm trying to set up pairing with tmux (wemux specifically). I have a pair user set up on my system and can ssh into pair and attach to a tmux session manually. However when I set up Forcecommand in the Match block to attach to tmux automatically on login, it fails saying that there is no tmux session to attach to.

Permissions are set to 777 on the socket.

I'm on OsX mountain lion, if that helps.

Any ideas?

1 Answer 1

0

If the other participant uses a different user account, you need to state the path to the socket you want to connect to with the -S /path/to/some/socket flag. The same flag can be specified when creating the tmux server.

This is because if you do not specify the socket path manually, the default location for the socket is /tmp/tmux-[USER ID]/default as you can see in tmux's source code. That means it differs for every user account.

A word of advice: You should not be setting the socket to 777 as this enables any user on the system to attach to sessions in it and execute commands in the shell running within. That most probably causes a serious security hole.

One idea to have an easy setup would be to create a group which contains all users allowed to join the tmux server and set it to be the owning group of the socket while setting the mode to 770.

Not the answer you're looking for? Browse other questions tagged .