1
0
mirror of https://github.com/danog/phpseclib.git synced 2024-12-14 10:07:32 +01:00

Merge branch '3.0'

This commit is contained in:
terrafrost 2021-03-16 21:19:29 -05:00
commit 2b1e5e40e2

View File

@ -1014,6 +1014,14 @@ class SSH2
*/ */
protected $auth = []; protected $auth = [];
/**
* Terminal
*
* @var string
* @access private
*/
private $term = 'vt100';
/** /**
* Default Constructor. * Default Constructor.
* *
@ -2646,7 +2654,7 @@ class SSH2
$this->server_channels[self::CHANNEL_EXEC], $this->server_channels[self::CHANNEL_EXEC],
'pty-req', 'pty-req',
1, 1,
'vt100', $this->term,
$this->windowColumns, $this->windowColumns,
$this->windowRows, $this->windowRows,
0, 0,
@ -2771,7 +2779,7 @@ class SSH2
$this->server_channels[self::CHANNEL_SHELL], $this->server_channels[self::CHANNEL_SHELL],
'pty-req', 'pty-req',
1, 1,
'vt100', $this->term,
$this->windowColumns, $this->windowColumns,
$this->windowRows, $this->windowRows,
0, 0,
@ -4624,6 +4632,17 @@ class SSH2
]; ];
} }
/**
* Allows you to set the terminal
*
* @param string $term
* @access public
*/
public function setTerminal($term)
{
$this->term = $term;
}
/** /**
* Accepts an associative array with up to four parameters as described at * Accepts an associative array with up to four parameters as described at
* <https://www.php.net/manual/en/function.ssh2-connect.php> * <https://www.php.net/manual/en/function.ssh2-connect.php>