RELATED TAGS linux, session, terminal, keep alive, server, remote
QUESTIONS
How can I run a program via terminal that keeps the connection via ssh?
What do I need to run a terminal session for a long time?
How do I keep a process running when ssh closes?
LINKS TMUX cheat sheet
Sometimes it's useful to continue a terminal session. For instance, when you run apps, that need to be running all the time.
You can do this with the application tmux .
Login
Login on the remote server via sshyou@local:$ssh root@{server-adress}
Install tmux
If not already installed, install tmuxroot@server:$sudo aptinstalltmux
Start Persistent Session
To start a session, create a new session with the below command and give it a name like 'my-server'
root@server:$tmuxnew-smyserver
Detach from Session
To detach from the session, press
CTRL + B
and than
D
Reconnect to Session
Later, you can return to the session with:
root@server:$tmuxattach-tmyserver
APP | VERSION Linux/Ubuntu 22
RELATED TAGS linux, session, terminal, keep alive, server, remote
QUESTIONS
How can I run a program via terminal that keeps the connection via ssh?
What do I need to run a terminal session for a long time?
How do I keep a process running when ssh closes?