public function execute($command, callable $callback = null)
    {
        $this->login();

        return $this->ssh->exec(sprintf('cd %s; %s', $this->directory, $command), $callback);
    }
public function execute($command, callable $callback = null)
    {
        $this->login();

        return $this->ssh->exec(sprintf('cd %s; %s', $this->directory, $command), $callback);
    }
public function execute ( $ command , callable $ callback = null ) { $ this -> login ( ) ; return $ this -> ssh -> exec ( sprintf ( 'cd %s; %s' , $ this -> directory , $ command ) , $ callback ) ; }
Executes command on connected server.

@param string $command
@param callable|null $callback

@return string
Executes command on connected server .