Find the answer to your Linux question:
Results 1 to 3 of 3
hi, i am using a ssh client to make a game server start up etc. It is working and all that but i wanted to know how can i make ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Posts
    2

    ssh - game server


    hi, i am using a ssh client to make a game server start up etc. It is working and all that but i wanted to know how can i make the server stay on even when i close the ssh. The server is running on a seperate box in the us can anyone please help?

    thanks.
    ps, sorry if this has been answered before

  2. #2
    Linux Guru sdousley's Avatar
    Join Date
    Feb 2004
    Posts
    1,790
    Quote Originally Posted by stozy10
    i wanted to know how can i make the server stay on even when i close the ssh
    Short answer: yes.

    Long answer: there are 2 ways this can be done. Firstly background the server by adding an & at the end of the command to start it. eg. to run an application called "foo" run:

    Code:
    foo &
    the second way is to install a neat little program called screen. With this, you can "detatch" the current terminal session to reconnect whenever you want.

    First install screen from here or from your distributions package manager. (this is on the game server). Then ssh into the game server and start a screen session

    Code:
    screen
    Then start the game server in your normal way.

    Then to detatch the screen session hit ctrl+a then release them and then press d. This will detatch the screen session so you can then log out of the ssh server. The advantage this has is that you can see any terminal output in the screen session when you reconnect, and the reconnect can happen from ANYWHERE you can ssh into the game server from.
    "I am not an alcoholic, alcoholics go to meetings"
    Registered Linux user = #372327

  3. #3
    Just Joined!
    Join Date
    Dec 2006
    Posts
    2
    thanks so much .... that worked perfectly.

    69.60.118.124:27960

    if anyone wants a game

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •