Networking Forums

Networking Forums > Computer Networking > Linux Networking > Keep a program running after SSH

Reply
Thread Tools Display Modes

Keep a program running after SSH

 
 
sublimanized@gmail.com
Guest
Posts: n/a

 
      10-14-2006, 04:04 AM
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 ....

 
Reply With Quote
 
 
 
 
David M
Guest
Posts: n/a

 
      10-14-2006, 11:45 AM
On Fri, 13 Oct 2006 21:04:34 -0700, sublimanized rearranged some electrons
to form:

> 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 ....


Why don't you start that client at boot time?
man inittab

--
David M (dmacchiarolo)
http://home.triad.rr.com/redsled
T/S 53
sled351 Linux 2.4.18-14 has been up 16 days 19:46

 
Reply With Quote
 
Mihai Osian
Guest
Posts: n/a

 
      10-14-2006, 01:08 PM
(E-Mail Removed) 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
 
Reply With Quote
 
John Thompson
Guest
Posts: n/a

 
      10-14-2006, 09:05 PM
On 2006-10-14, (E-Mail Removed) <(E-Mail Removed)> 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 ((E-Mail Removed))
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      10-14-2006, 10:31 PM
(E-Mail Removed) 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

 
Reply With Quote
 
Vilmos Soti
Guest
Posts: n/a

 
      10-14-2006, 11:12 PM
Unruh <unruh-(E-Mail Removed)> 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
 
Reply With Quote
 
Raqueeb Hassan
Guest
Posts: n/a

 
      10-15-2006, 02:40 PM

Vilmos Soti wrote:
> Unruh <unruh-(E-Mail Removed)> 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

 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      10-15-2006, 03:18 PM
"Raqueeb Hassan" <(E-Mail Removed)> writes:


>Vilmos Soti wrote:
>> Unruh <unruh-(E-Mail Removed)> 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.


 
Reply With Quote
 
Vilmos Soti
Guest
Posts: n/a

 
      10-15-2006, 08:25 PM
"Raqueeb Hassan" <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
print running time of a program. Jin Linux Networking 1 04-10-2009 09:42 PM
Program Scheduler to start and end a program? Kevin Wooloff Home Networking 1 09-05-2006 04:10 PM
Fax Program Alan Linux Networking 4 05-01-2005 06:07 PM
There has top a a program BORG Home Networking 3 01-27-2005 12:51 AM
Fedora Core 2 NAT Router freezes when left running with Azurus running on a local machine. Lee Caves Linux Networking 0 11-01-2004 08:45 PM



1 2 3 4 5 6 7 8 9 10 11