Help - Search - Members - Calendar
Full Version: Programs Closed After Ssh Logout
Linuxhelp > Support > Technical Support
Hello guys!

I've got an SSH access to Slackware Linux Server and I've got a Gameserver running on it.
The Servertool is started from the root account and it works fine. I can also run it without problems via my SSH account but when I close the SSH connection the Server terminates the process. How can I logout and keep the programs running? I and my friend, who owns the server, haven't got any ideas anymore.

Hope someone in here can help me.

Well, you have two options that i know of:

You can send the processes to the background and then bring them to the foreground when you want to work on it. You can do this like the following:

./binaryfile &

The & sign sends the process to the background, which you can later retrieve with:


For further info on this, check out the man pages.

The second, and probably best way of doing this is to install the "screen" utility. Chances are, this is installed by default, and if it isn't, it should be easily available for your distro. So, after installing, go ahead and open your shell, and type in:


Depending on your install, you'll either be greeted with a screen asking you to "Press Space or Return to end" (just hit space), or it will dump you right back to the shell again. When you are back at the shell, you are actually still inside the screen program. So, go ahead and run your server program:


And you'll see that starting up. From here, you can go ahead and type:

Ctrl+A and then press D

The "Ctrl+A" is the command prefix, and "D" tells the program to "detach". When you do this, you're dumped right back to the shell again. From here, you can log off, or whatever. The next time you login, do:

screen -r

Which will "re-attach" you're screen.

This is a pretty simple explanation of screen, there is tons of more info in the man page.

Out of these two suggestion, i would definitly recommend you use screen, it's easier, nicer and cleaner to work with.

Any questions, let me know.
Method B works fine! Thanks You smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.