phpseclib\Net\SSH2::setWindowSize PHP Метод

setWindowSize() публичный Метод

Sets the number of columns and rows for the terminal window size.
public setWindowSize ( integer $columns = 80, integer $rows = 24 )
$columns integer
$rows integer
    function setWindowSize($columns = 80, $rows = 24)
    {
        $this->windowColumns = $columns;
        $this->windowRows = $rows;
    }

Usage Example

Пример #1
0
 /**
  * Establish a SSH connection to the switch if necessary
  *
  * @throws ConnectionException If the connection fails
  */
 protected function connect()
 {
     if (false == $this->ssh instanceof SSH2) {
         $this->ssh = new SSH2($this->ip);
         $this->ssh->setWindowSize($this->terminalColumn, $this->terminalLine);
         if (false == @$this->ssh->login($this->user, $this->password)) {
             throw new ConnectionException(sprintf("Connection to %s with user %s failed", $this->ip, $this->user));
         }
         $this->ssh->read('continue');
         $this->ssh->write($this->enterKey);
         $this->ssh->read('`' . $this->promptPattern . '`', SSH2::READ_REGEX);
     }
 }
All Usage Examples Of phpseclib\Net\SSH2::setWindowSize