Download the PHP package cullylarson/ssh-copy without Composer

On this page you can find all versions of the php package cullylarson/ssh-copy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ssh-copy

SSH Copy

A library for performing remote copies. Copy to/from local, to/from remote, and even between two remote machines.

Install

Construct

You'll do everything with an instance of Cully\Ssh\Copier. Its constructor takes three parameters:

  1. $sshSource (resource|null) (optional, default:null) An SSH connection resource. If null, will assume the source is the local machine. If its a resource, will assume the source is a remote machine.

  2. $sshDestination (resource|null) (optional, default:null) An SSH connection resource. If null, will assume the destination is the local machine. If its a resource, will assume the destination is a remote machine.

  3. $localTmp (string|null) (optional, default:null) If copying between two remote machines, the copy will first transfer the files to from the remote source, to the local machine, and then to the remote destination. So, you need to provide a temporary folder to house the files locally.

copy

The Cully\Ssh\Copier::copy function takes two arguments:

  1. $sourceFilepath (string|array) (required) The path to the file that you want to copy from the source machine. Instead of passing a single path, you can pass an array of paths to files you want to copy. If an array is provided, the $destFilepath parameter must also be an array of the same length.

  2. $destFilepath (string|array) (required) The path on the destination machine, where you want the file copied. Instead of passing a single path, you can pass an array of paths to files you want to copy. If an array is provided, the $sourceFilepath parameter must also be an array of the same length.

Returns: boolean True on success, false on fail.

NOTE: Currently the copy function DOES NOT create parent folders. The folders must already exist. Maybe something for a future release.

copyAssoc

The Cully\Ssh\Copier::copyAssoc function is similar to copy, except it takes one argument:

  1. $sourceAndDest (array) (required) An associative array where keys are source file paths, and values are destination file paths.

Returns: boolean True on success, false on fail.

Examples

Setup SSH Connections

NOTE: If you're using RSA for the examples below, and you get an auth error, you might need to run this command:

$ eval `ssh-agent -s` && ssh-add

Copy / Local to Local

Copy / Local to Remote

Copy / Remote to Local

Copy / Remote to Remote

Copy / Remote to Remote with Multiple Files

Copy / Remote to Remote with Multiple Files using copyAssoc


All versions of ssh-copy with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cullylarson/ssh-copy contains the following files

Loading the files please wait ....