This is a discussion on Keep a program running after SSH within the Linux Networking forums, part of the Linux Forums category; hello all ... this might be a simple question, but i'm kind of a linux noobie ... i have a FC5 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
hello all ... this might be a simple question, but i'm kind of a linux
noobie ... i have a FC5 box in my apartment that my roommates and i use as a fileserver. .... since thats all it does, i want to put it to good use in its free time.. i want to run a Folding@home client on it, but its a headless server, .... i only have console access when i log in via SSH .... i want to know how i can log in with SSH, and start the folding client, and then log out, and keep the folding client alive on the machine when the SSH client disconnects... .... is this possible? ... thank you .... |
|
|||
|
sublimanized@gmail.com wrote:
> hello all ... this might be a simple question, but i'm kind of a linux > noobie ... > > i have a FC5 box in my apartment that my roommates and i use as a > fileserver. > > ... since thats all it does, i want to put it to good use in its free > time.. > > i want to run a Folding@home client on it, but its a headless server, > ... i only have console access when i log in via SSH .... i want to > know how i can log in with SSH, and start the folding client, and then > log out, and keep the folding client alive on the machine when the SSH > client disconnects... > > ... is this possible? ... > > thank you .... > After you login, you run "screen" (assuming it is installed). You run whatever application you have, then detach from the terminal with Ctrl-A-D. If you want to reattach, run "screen -r". man screen (also: man nohup) Mihai |
|
|||
|
On 2006-10-14, sublimanized@gmail.com <sublimanized@gmail.com> wrote:
> i have a FC5 box in my apartment that my roommates and i use as a > fileserver. > > ... since thats all it does, i want to put it to good use in its free > time.. > > i want to run a Folding@home client on it, but its a headless server, > ... i only have console access when i log in via SSH .... i want to > know how i can log in with SSH, and start the folding client, and then > log out, and keep the folding client alive on the machine when the SSH > client disconnects... > > ... is this possible? ... You can either start it in e.g. "rc.local" or run it in a screen session. See "man screen" -- it's a useful program. -- John (john@os2.dhs.org) |
|
|||
|
sublimanized@gmail.com writes:
>hello all ... this might be a simple question, but i'm kind of a linux >noobie ... >i have a FC5 box in my apartment that my roommates and i use as a >fileserver. >... since thats all it does, i want to put it to good use in its free >time.. >i want to run a Folding@home client on it, but its a headless server, >... i only have console access when i log in via SSH .... i want to >know how i can log in with SSH, and start the folding client, and then >log out, and keep the folding client alive on the machine when the SSH >client disconnects... >... is this possible? ... >thank you .... Yes, but you have to disassociate the input and outputs from the ssh session. name-of-program optionsofprogram >/tmp/out 2>&1 </dev/null & should allow you to do that |
|
|||
|
Unruh <unruh-spam@physics.ubc.ca> writes:
>> i want to run a Folding@home client on it, but its a headless server, >> ... i only have console access when i log in via SSH .... i want to >> know how i can log in with SSH, and start the folding client, and then >> log out, and keep the folding client alive on the machine when the SSH >> client disconnects... > >>... is this possible? ... > >> thank you .... > > Yes, but you have to disassociate the input and outputs from the ssh > session. > > name-of-program optionsofprogram >/tmp/out 2>&1 </dev/null & > > should allow you to do that Or look around the "nohup" command. Vilmos |
|
|||
|
Vilmos Soti wrote: > Unruh <unruh-spam@physics.ubc.ca> writes: > > >> i want to run a Folding@home client on it, but its a headless server, > >> ... i only have console access when i log in via SSH .... i want to > >> know how i can log in with SSH, and start the folding client, and then > >> log out, and keep the folding client alive on the machine when the SSH > >> client disconnects... > > > >>... is this possible? ... > > > >> thank you .... > > > > Yes, but you have to disassociate the input and outputs from the ssh > > session. > > > > name-of-program optionsofprogram >/tmp/out 2>&1 </dev/null & > > > > should allow you to do that > > Or look around the "nohup" command. > > Vilmos screen did work fine with me all these years. As others said, it is perfect for any headless server, never get killed! $ screen client_app -switches -that -client -support [ctrl] + A, D (detached) $ For reattaching the client $ screen -r When the client is through with it's job, the screen will terminate automatically. Isn't that fantastic? -- Raqueeb Hassan Bangladesh |
|
|||
|
"Raqueeb Hassan" <wideangle@gmail.com> writes:
>Vilmos Soti wrote: >> Unruh <unruh-spam@physics.ubc.ca> writes: >> >> >> i want to run a Folding@home client on it, but its a headless server, >> >> ... i only have console access when i log in via SSH .... i want to >> >> know how i can log in with SSH, and start the folding client, and then >> >> log out, and keep the folding client alive on the machine when the SSH >> >> client disconnects... >> > >> >>... is this possible? ... >> > >> >> thank you .... >> > >> > Yes, but you have to disassociate the input and outputs from the ssh >> > session. >> > >> > name-of-program optionsofprogram >/tmp/out 2>&1 </dev/null & >> > >> > should allow you to do that >> >> Or look around the "nohup" command. >> >> Vilmos >screen did work fine with me all these years. As others said, it is >perfect for any headless server, never get killed! >$ screen client_app -switches -that -client -support >[ctrl] + A, D >(detached) >$ >For reattaching the client >$ screen -r >When the client is through with it's job, the screen will terminate >automatically. Isn't that fantastic? Yup, it probably is better than my suggestion. It is nice that Linux gives you so many ways of doing things. |
|
|||
|
"Raqueeb Hassan" <wideangle@gmail.com> writes:
> screen did work fine with me all these years. As others said, it is > perfect for any headless server, never get killed! > > $ screen client_app -switches -that -client -support > [ctrl] + A, D > (detached) There is one problem with screen (which is not screen's fault). If somebody breaks into your machine, then he can take over your screen session. AFAIR, this is how Apache got rooted a couple of years back. Somebody had su'd in screen, and it was taken over. Vilmos |