How to starting process as Daemon using ssh command?

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. Yep, you got an ssh process on your local machine left, which is not needed anymore, yep.

How to start SSH process in the background?

In the meantime, you could have been using the shell. When using nohup, make sure you also redirect stdin, stdout and stderr: In this way you will be completely detached from the remote process. Be carefull with using ssh -f user@host… since that will only put the ssh process in the background on the calling side.

How to use SSH to start a remote process?

I am using SSH to start a background process on a remote server. This is what I have at the moment: This works, in that the process does start. But the SSH session itself does not end until I hit Ctr-C. When I hit Ctr-C, the remote process continues to run in the background.

How to exit a SSH session in Linux?

You could use screen to run your process on this screen, detach from screen Ctrl-a :detach and exit your current session without problem. Then you can reconnect to SSH and attach to this screen again to continue with your task or check if is finished. Or you can send the command to an already running screen.

How to start the SSHD daemon in a dedicated subsystem?

To better control the environment and resources that are used by SSH jobs, we recommend that you run SSH jobs in a dedicated subsystem. This becomes even more obvious when we discuss how the SSHD environment works. When you start the SSHD daemon on the IBM i, a single job for the daemon is started.

When to run SSH jobs in a separate subsystem?

When a user is authenticated for this client session, another job is spawned. In addition, if the user runs a command or job, another job is started; this means that you might end up with three jobs for a single client user. Therefore, we recommend that you run all SSH jobs in a separate subsystem.

What happens to SSHD when autostart job completes?

When processing of the autostart job completes, the SSHD job is no longer active. SSHD processing will be handled by job QP0ZSPWP. The QP0ZSPWP job will run in the dedicated SSH subsystem.