0

I have a machine running the latest version of Ubuntu Server. It is an Ethereum Mining Rig running Claymore 95. My primary way of viewing it's activities are through SSH. This works great, except if I end that SSH session and reconnect I am just at the Bash Prompt. If I give it the command to begin mining, it will restart the program all the way from the beginning. I am wondering if there's any way to begin viewing Claymore 95 on a new SSH session, because it is still running after I quit SSH obviously.

Let me know if there's any other information I need to provide and thank you for any assistance you can offer in this matter!

Edit: Upon further inspection, it appears that after I close the SSH session the program stops running. This doesn't seem like the way it should behave. Is there a way to ensure it keeps running after closing the SSH session?

Edit2: Just needed to properly apply the Screen command.

Aserre
  • 1,177
  • 12
  • 18
NewBoard
  • 3
  • 5
  • You can use `screen` to run some command after you close the ssh connection. – M. Dm. Oct 12 '17 at 12:49
  • Thank you M. Dm. After some research into the screen command, I have found that this works excellently for what I'm trying to do! – NewBoard Oct 12 '17 at 13:49
  • 4
    Please don't edit SOLVED into your question title. Instead, post the solution as an answer below – Zanna Oct 12 '17 at 15:03
  • 2
    @M.Dm. could you post that as an answer? Please avoid posting answers in comments, that means the question will never be marked as answered. NewBoard, even better, it would be great if you could take a moment and post an answer explaining what you did. – terdon Oct 12 '17 at 17:59

1 Answers1

1

To preserve running some program or script in background after exit of current session you might need to use screen package that can be installed sudo apt-get install screen. Basic syntax is screen -S screen_name, a new 'window' will open. Here you can launch you script and to deattach from current screen session use key sequence Ctrl-A + d. To list all active screens just type screen -ls, to attach to an active screen screen -r screen_id. More detailed exmaples can be found here

M. Dm.
  • 1,442
  • 6
  • 8