![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Stoping & starting the cron daemon | othman | SCO | 0 | 04-30-2007 10:23 AM |
| Starting MySQL daemon | unispace | UNIX for Dummies Questions & Answers | 15 | 12-14-2006 09:40 PM |
| process starting | count_zero | OS X (Apple) | 2 | 08-09-2004 03:39 PM |
| capture the process id when starting a background process | jleavitt | Shell Programming and Scripting | 10 | 04-04-2002 08:04 AM |
| Daemon process | s_chordia | High Level Programming | 2 | 01-17-2002 02:09 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How to starting process as daemon using ssh command?
Hello,
I need to run a command on remote Linux using the ssh command from my local machine. I am able to execute the command on remote machine using ssh but it's behaving strangely. The command is supposed to start a daemon process on remote linux box and the control should return back to me but strangely this does not happen. The command works properly (i.e. starts the daemon process) when I ssh into remote linux box and type the command on console. Here is how I give command on remote linux machine after sshing into the box. $ /usr/local/bin/fatality.sh --email=nitins.shukla@gmail.com --log_dir=/tmp/fatality & [1] 23274 $ This works fine and the process runs as daemon in background. But when I try to run this command on same Linux box from my local machine, the process does not start as daemon and runs in background. Here's how I give the command from my linux machine $ ssh root@remotelinux "/usr/local/bin/fatality.sh --email=nitins.shukla@gmail.com --log_dir=/tmp/fatality \"&\"" The control does not return back to me. Logging on the remote linux box I find that the process is running but not as daemon process in background. Can anyone help how I should pass the command to ssh start the process as daemon process so that the control returns back to me. Note both the time I am using same user account i.e. root to log on remote linux machine. Any help is deeply appreciated. Thank n Regards, Nitin |
|
||||
|
How to starting process as daemon using ssh command?
The -f option makes the ssh command on my local linux box to run in background which is not what I intend want to do. I want the process on remote linux (that I am invoking to throught ssh command) to start in background on the remote linux box.
|
|
||||
|
Same problem
I am having the same problem. I am having cruise control kick off a script that deploys to a dev machine nightly and start up the service, yet the ssh process still runs in the background causing cruise control to hang.
I am thinking of trying to run the daemon in a screen so that I can detach from the console, but not sure how to do that in a script, I've only used screen from the command line using the ctrl commands. Any thoughts? |
|
||||
|
point stdin and stdout to /dev/null
I found this on google groups: Starting a daemon with ssh - comp.unix.admin | Google Groups
ssh server 'program </dev/null >/dev/null 2>&1 &' that redirects the stdin to /dev/null, the stdout to /dev/null, and the stderr to stdout This worked for me so that the remote execution kicked off the daemon and didn't wait around for output. Will |
![]() |
| Bookmarks |
| Tags |
| linux, solaris |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|