Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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)?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
quite straightforward to use and functional.. thanks, this will be useful! –  Jack Feb 10 '11 at 10:05
    
@Jack you're most welcome! –  John T Feb 10 '11 at 16:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.