1

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.

realsub
  • 27
  • 1
  • 5

2 Answers2

2

Try nohup & command. This way the shell should keep the process running, even if you log out.

0

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.

ahalbert
  • 474
  • 1
  • 6
  • 15
  • Gonna take some time getting used to how it works, but it does what I want so thank you! :) – realsub Jan 11 '16 at 20:04
  • Personally, I found tmux one of the most powerful CLI tools I've ever used. You can have as many windows open as you want, can split windows from within the terminal, and has universal copy paste. It's something that once I started using, can't live without. – ahalbert Jan 12 '16 at 17:29