Unable to use any ghost command

Message: Command failed: /bin/sh -c sudo -S -p '#node-sudo-passwd#'  systemctl is-active ghost_localhost
#node-sudo-passwd#
unknown

Exit code: 3


Debug Information:
    OS: CentOS Linux, v7
    Node Version: v16.13.0
    Ghost Version: 4.22.4
    Ghost-CLI Version: 1.18.1
    Environment: production
    Command: 'ghost uninstall'

Ghost command like ‘ghost uninstall’ ‘ghost setup’ ‘ghost install’ etc. are stopped will the error shown above. I can confirm that passwords are entered correctly. Any help will be appreciated!