This library based on the phpseclib project.
just move the SSH.php file and the ssh folder into your libraries folder, this code tested with PHP 7.2.
$this->load->library('SSH', array(
'host' => 'your.host',
'user' => 'username',
'pass' => 'password',
'port' => 'port'
));
echo $this->ssh->exec('pwd');
echo $this->ssh->exec('ls -la');