About Running Shell Commands Remotely

You can run commands remotely using the ssh tool as follows:

scp backup.zip root@
ssh root@ chown myproject:www-data /var/backups/backup.zip

That's useful for simple maintenance scripts.

N.B. For security reasons, avoid setting SSH connections with a root user and password. Connections with SSH private and public keys should be OK.

Tips and Tricks Dev Ops Security Maintenance Bash SSH