In this recipe, we'll make use of the sshexec
task provided by the ssh (0.12.2)
plugin to run commands on a remote server over the SSH network protocol.
Running commands on a remote server can become a necessity during the deployment process, and when we run commands, we'd like be sure that it is being done securely. The SSH protocol is the de facto standard to run commands on remote servers, due in part to the improved security that it provides by encrypting all data that is sent over the network.
In this example, we'll work with the basic project structure that we created in the Installing Grunt on a project recipe in Chapter 1, Getting Started with Grunt. Be sure to refer to it if you are not yet familiar with its contents.
In addition to the standard project setup, the following recipe will also require an existing user account on the targeted SSH-enabled server. These credentials are usually provided by the hosting service or administrator who maintains...