public function scpCopy($target, $target2)
{
$serverConfig = $this->getConfiguration();
$scpOptions = [];
if ($serverConfig->getPort()) {
$scpOptions[] = '-P ' . escapeshellarg($serverConfig->getPort());
}
if ($serverConfig->getPrivateKey()) {
$sshOptions[] = '-i ' . escapeshellarg($serverConfig->getPrivateKey());
}
$scpCommand = 'scp ' . implode(' ', $scpOptions) . ' ' . escapeshellarg($target) . ' ' . escapeshellarg($target2);
$process = new Process($scpCommand);
$process->setTimeout(null)->setIdleTimeout(null)->mustRun();
return $process->getOutput();
}