upterm
upterm copied to clipboard
Reconnect
(Translated by Google)
Hi
When I disconnect from the remote terminal, doing 'exit', I am actually also closing the process on the server, and I cannot reconnect, since 'upterm' is no longer running.
Is there any way I can close my remote session, but leave the process running on the server?
@marcoas There may be some confusion on terms. By server, I think you mean the host which creates the terminal session: https://github.com/owenthereal/upterm#how-it-works. To keep the host terminal session when the client disconnects, you would need a terminal multiplexer like tmux
, e.g. upterm host --force-command 'tmux attach -t pair-programming' -- tmux new -t pair-programming
(Ref https://github.com/owenthereal/upterm#quick-reference). This creates a tmux session on the host and when the client joins, it joins with tmux attach
to the tmux session. When typing exit
on the client, it only disconnects the client but the host tmux session remains. Hope that helps.