Upload file to remote server. Needs task runner Robo (Download http://robo.li)
/**
* Upload files for import
*/
public function UFI($siteprefix) {
$dir = "/path/to/dir/{$siteprefix}/";
$task = $this->taskExecStack();
$this->taskSshExec('user@host')
->remoteDir("/path/to/dir/")
->exec("rm -rf {$siteprefix}/*")
->run();
$task->exec("scp -r $dir user@host:/path/to/dir/{$siteprefix}/");
$task->run();
}