phpseclib: An Introduction

phpseclib is designed to be ultra-compatible. It works on PHP4+ (PHP4, assuming the use ofPHP_Compat) and doesn’t require any extensions. For purposes of speed, mcrypt is used if it’s available as is gmp or bcmath (in that order), but they are not required.



//important:- set include path
 set_include_path(get_include_path() . PATH_SEPARATOR . 'phpseclib'); 
$ssh = new Net_SSH2('www.domain.tld'); 
if (!$ssh->login('username', 'password')) 
{ exit('Login Failed'); } 
echo $ssh->exec('pwd'); 
echo $ssh->exec('ls -la'); ?>




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this:
search previous next tag category expand menu location phone mail time cart zoom edit close