Skip to content

Library that provides wrapper methods around SSH2 and SFTP to simplify file download/upload over SSH/SCP/SFTP.

Notifications You must be signed in to change notification settings

21dev/idct-sftp-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

idct-sftp-client

Library that provides wrapper methods around SSH2, SCP and SFTP to simplify file download/upload over SSH/SCP/SFTP.

warning

I am still thinking about unification of download / upload methods by passing a paramter which would define the connection type therefore method names may change.

example

use IDCT\Networking\Ssh\SftpClient;
use IDCT\Networking\Ssh\Credentials;

$client = new SftpClient();

$username = 'YOUR_USER_NAME';
$password = 'YOUR_PASSWORD';
$host = 'HOST_NAME';

$credentials = Credentials::withPassword($username, $password);

$client->setCredentials($credentials);
$client->connect($host);

$client->download(ENTER_REMOTE_FILE_NAME);
$client->download(ENTER_REMOTE_FILE_NAME, ENTER_LOCAL_FILE_NAME);

$client->scpDownload(ENTER_REMOTE_FILE_NAME);

$client->scpUpload(ENTER_LOCAL_FILE_NAME,ENTER_REMOTE_FILE_NAME);

$client->close();

About

Library that provides wrapper methods around SSH2 and SFTP to simplify file download/upload over SSH/SCP/SFTP.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%