Closed wjg55555 closed 7 months ago
Is there any configuration on the server that I didn't set?
What are the configurations of the pm2 remote deployment server?
PM2 is unrelated to ssh2-sftp-client module. You will need to get support from a pm2 specific forum
I'm not sure why you'd expect output from a restart command, but maybe pm2 does?
The only thing I can think of is maybe pm2 is expecting a TTY. If so, you will need to explicitly request a pty if you're using ssh.exec()
since it does not do so default (compared to ssh.shell()
which does). The documentation for ssh.exec()
shows how you can request a pty.
If that doesn't help then I'm afraid you will need to submit an issue on the pm2 issue tracker as I am not familiar with pm2 at all.
The pm2 command cannot be used remotely. The node command is successful