<?php
include ('Services/sshlib/Crypt/RSA.php');
include ('sshlib/Net/SSH2.php');
$ip = "Yor IP";
$port = 22;
$username = 'root';
$private_key_path = 'Private Key Path';
$ssh = new Net_SSH2($ip, $port);
$key = new Crypt_RSA();
$key->loadKey(file_get_contents($private_key_path));
$ssh->login($username, $key);
$result = $ssh->exec('ls');
echo $result;
-
Notifications
You must be signed in to change notification settings - Fork 0
vahidrezazadeh/sshlib
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Library for Connect To SSH With PHP
Resources
Stars
Watchers
Forks
Releases
No releases published