/** * Execute command * * @param string $command * @return bool */ public function Execute($command) { if (!$this->SSHConnection->IsConnected()) $this->Connect(); $res = $this->SSHConnection->Exec($command); if ($res === true) $res = $this->SSHConnection->StdErr; return $res; }
/** * Is SSH2 connected * * @return bool */ public function IsConnected() { return $this->SSH2->IsConnected(); }