Search code examples
sshopensshvncvnc-server

SSH from one computer, continue on another?


I have a home server running Ubuntu Server 14.04 and I've setup OpenSSH on it. But. I'm intending to run some terminal based stuff that takes long time to be finished. So what I wanna be able to do is ssh into the server, start the process, log out of the computer i connected with and connect from another device and have that process I started still running. Almost like a remote-desktop type SSH connection.

If this is not possible then I'll just install a desktop environment and vnc server.


Solution

  • One option is the program tmux or screen, which you can detach from and log out.

    Instructions for tmux:

    1. $ ssh me@server
    2. $ tmux
    3. run commands
    4. Ctrl-B d (this means push CTRL-B then push d to detach from tmux) logout

    If you want to see the results, use tmux attach when you log back in. Your session will be exactly as you left it.