Geddy CLI closes when SSH exits

In a remote CentOS application, the Geddy VM with MonogoDB is deployed. The application starts and listens on port 80 when the command is lower.

geddy -e production & 

The problem with this CLI command is that when the SSH connection to the VM has been disconnected, the process automatically closes. In order for the application to work, SSH must always be opened, which is impossible. Is there an alternative method to make it work as a background service.

+8
linux ssh geddy
source share
1 answer

This is because processes that are simply connected to the background will be sent to the SIGHUP signal when their control terminal (SSH connection) is closed.

The traditional way to prevent this is to use the nohup utility:

 nohup geddy -e production & 

Alternatively, you can use terminal multiplexers such as screen or tmux to create permanent terminal sessions (those that remain active when you log out and that can be reconnected when you log in again later).

+5
source share

All Articles