O'Reilly logo

Grunt Cookbook by Jurie-Jan Botha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running commands over SSH

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.

Getting ready

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 Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required