0

I want to be able to start some specific servers (related to a game) on a my VPS (to which I connect through ssh). This is simple, I just connect and execute the command, but this creates some problems.

What I would like to do is:

  • launch it in a way that doesn't depend on SSH (eg. I don't want it to close when I close the SSH session)
  • be able to retrieve the stdin/stdout of the process (this because I can send commands through stdin, but once lost I don't exactly know how I'm supposed to get it back and keep using it)

I think there are many solutions out there which would be a simple and efficient for my problem (without looking for anything too complex)?

1 Answer 1

1

Using GNU Screen would be an easy choice.

  • Open new screen session with the screen command
  • Execute desired commands
  • Detatch with Ctrl + A - Ctrl + D
  • Exit SSH

Next time you need to reconnect to the screen session, simply run screen -r (resume). If you expect a lot of output, you may want to redirect STDOUT and STDERR to a file in the screen session.

2
  • quite straightforward to use and functional.. thanks, this will be useful!
    – Jack
    Commented Feb 10, 2011 at 10:05
  • @Jack you're most welcome!
    – user1931
    Commented Feb 10, 2011 at 16:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .