public function login() { set_include_path(get_include_path() . PATH_SEPARATOR . APPPATH.'third_party/phpseclib'); include(APPPATH . 'third_party/phpseclib/Net/SSH2.php'); include(APPPATH . 'third_party/phpseclib/Crypt/RSA.php'); $ssh = new Net_SSH2('192.168.88.1:8888'); $key = new Crypt_RSA(); $key->loadKey(file_get_contents(APPPATH . 'third_party/phpseclib/privatekey.pem')); if (!$ssh->login('rest', $key)) { exit('Login Failed'); } echo $ssh->exec(':put [/inter ether print]'); } resource: https://stackoverflow.com/questions/32762655/phpseclib-gives-me-a-strange-erros https://phpseclib.sourceforge.net/
All about Blogging, Networking, Development, Engineering and all my passion