protected function makeSshCommand($command)
{
$sshCommand = new SshCommand($this->sshCredentials['host'], $command);
if (!empty($this->sshCredentials['user'])) {
$sshCommand->user = $this->sshCredentials['user'];
}
if (!empty($this->sshCredentials['port'])) {
$sshCommand->port = $this->sshCredentials['port'];
}
if (!empty($this->sshCredentials['identityFile'])) {
$sshCommand->identityFile = $this->sshCredentials['identityFile'];
}
return $sshCommand;
}