Automating Tasks with SSH
Motivation
Besides interactive login, SSH can also be used to automate thing by directly executing remote commands and also connecting STDIN and STDOUT to transfer date.
To understand the following examples, make sure you know about Redirecting and Piping input and output of commands.