Run local bash scripts on remote server

  1. Run the SSH command that you normally use to log onto the machine

  2. Inject the script into the ssh command:

ssh -i ~/.ssh/KEY USERNAME@SERVERNAME < SCRIPT.sh

Last updated