From 624f514e889b93ba881381048ce810266c658ad2 Mon Sep 17 00:00:00 2001 From: terrafrost Date: Tue, 16 Mar 2021 21:18:56 -0500 Subject: [PATCH] SSH2: add setTerminal() method --- phpseclib/Net/SSH2.php | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index ef57edcc..82f607d8 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1014,6 +1014,14 @@ class SSH2 */ protected $auth = []; + /** + * Terminal + * + * @var string + * @access private + */ + private $term = 'vt100'; + /** * Default Constructor. * @@ -2646,7 +2654,7 @@ class SSH2 $this->server_channels[self::CHANNEL_EXEC], 'pty-req', 1, - 'vt100', + $this->term, $this->windowColumns, $this->windowRows, 0, @@ -2771,7 +2779,7 @@ class SSH2 $this->server_channels[self::CHANNEL_SHELL], 'pty-req', 1, - 'vt100', + $this->term, $this->windowColumns, $this->windowRows, 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 *