LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-09-2006, 11:18 AM   #1
rino.caldelli
Member
 
Registered: Apr 2005
Location: perugia
Distribution: ubuntu
Posts: 181

Rep: Reputation: 31
open a process from ssh


I've got a question.. if I login to my computer from ssh and run a program like azureus even if I run it with "azureus &" to detach it from the shell, when I close the connection the program closes....
How can I do it to run persistently a service from remote????

thank you...
 
Old 03-09-2006, 11:20 AM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
nohup is your friend in this case.
 
Old 03-09-2006, 12:10 PM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,508
Blog Entries: 2

Rep: Reputation: 68
Wells is right. nohup is the answer.

But let me introduce you a program named "screen".
It is great to keep a session open so you can close the connection and re-connect later and re-open that session.

After you get into the remote system run the program "screen". A new shell will be opened. Run your program now. Let say it is a program like badblocks that take forever to finish and shows in the console the progress.
Then type CTRL-A, D to detach from the screen. Close your connection to the remote shell.
At any time, you can connect to the remote host, and this time, type "screen -r" to re-attach to the existing session. You get the badblocks running and any output on terminal.

It is a obscure but great program that deserves more visibility.

cheers,
 
Old 03-14-2006, 10:22 PM   #4
krasl
Member
 
Registered: Nov 2005
Distribution: Fedora 4
Posts: 40

Rep: Reputation: 15
screen is great! I even created an admin account which makes 'screen' the default shell. (You gurus out there tell me whether this is a good or bad idea, please!) But it's nice to simply log in with my admin username and be looking at a prompt which is already running screen. Then if I close the connection (or it gets dropped due to connectivity problems) I just log in again and see exactly what I was looking at before. A real lifesaver!

Krasl
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh-agent process buildup nifflerX Linux - General 4 03-09-2006 09:23 AM
pause/resume an ssh make or other process linuxhippy Slackware 4 09-01-2005 05:03 AM
SSH connection termination during a running process... jayemef Linux - General 1 08-16-2005 11:41 AM
open ports on linksys, i have ssh open but thats it PlatinumRik Linux - Security 1 07-07-2005 10:38 AM
ssh-agent process not killed Notwerk Fedora 0 06-20-2005 07:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration