ssh -t deploy@203.0.113.10 sudo systemctl status nginx

Category: VPS Management

ssh -t deploy@203.0.113.10 sudo systemctl status nginx

Run sudo remotely with a forced pseudo-terminal

The -t flag allocates a pseudo-terminal, which sudo requires when prompting for a password — without it you get 'sudo: no tty present'. This runs one command on the server and returns, the building block of remote administration. Add -tt if even the sudo prompt needs a TTY.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.