I want to duplicate the functionality of PECL PHP interactive shell function ssh2_shell()
using PHPSecLib. How would I do that? I see that openShell()
was recently exposed as a public function but I don’t see any examples how to use that. I am wondering if that is what I need to use.
Here is the ssh2_shell()
function that I am currently using and would like to try duplicate with PHPSecLib so that I can migrate completely away from using libssh.
/**
* SSH2 shell getter. For Ratchet stream console
*
* @param [type] $session
* @param string $termType
* @param [type] $env
* @param string $width
* @param string $height
* @param string $widthHeightType
* @return void
*/
public function getShell($termType = 'vanilla', $env = null, $width = 80, $height = 25, $widthHeightType = SSH2_TERM_UNIT_CHARS)
{
return ssh2_shell($this->ssh, $termType, $env, $width, $height, $widthHeightType);
}