Download the PHP package epiecs/phpmiko without Composer

On this page you can find all versions of the php package epiecs/phpmiko. 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 phpmiko

PhpMiko

<3 NetMiko but I'm a php developer. So I've decided to build a php alternative

Mad respect to Kirk Byers for creating netmiko and being a huge inspiration to this project.

To hit the ground running check out the Quickstart example.

Requires:

Installation:

Supported devices

Implemented

Planned

Supported protocols

Contents

Examples:

Quickstart example

Connecting to a device

When the raw flag is set to true PhpMiko will not clean up output and return it as is (minus a few hidden characters so you at least get all textual output).

secret is used when a runlevel requires a different password. Like for example enable mode (privileged exec) in Cisco ios. You would put the enable password in the secret field.

verbose when set to true all sent and received raw packets will be ouput for debugging purposes.

For a list of all __device_types__ refer to Device types and command mapping.

Sending commands

When sending commands you can either provide a string or an array. Either way is fine. When providing an array the commands are run in order.

In these examples the command type operation is used. For all command types check out Command types.

Sending one command as string

Sending one command as an array

Sending multiple commands

Output

All output will be returned as an array where the key is the command that was run

Command types

PhpMiko has 3 distinct mechanisms to send commands:

All commands are run sequentially and chained. However this is only per set of supplied commands.

Even though PhpMiko has 3 mechanisms not all are implemented on each device. Some devices only have 1 or 2 configuration tiers. For an overview please refer to Device types and command mapping.

cli

Runs one or more cli commands on a device. Eg. the standard linux cli in junos or user exec mode in cisco ios

operation

Runs one or more operational/enable commands on a device. Eg. cli (operational) mode in junos or privileged exec mode in cisco ios

configure

Sends one or more configuration commands to the device. Eg. configuration mode in junos or global configuration (configure terminal) in cisco ios

Device types and command mapping

Vendor Device device_type cli operation configure
Aruba Aruba aruba user exec privileged exec configure terminal
Cisco Cisco ios cisco_ios user exec privileged exec configure terminal
Cisco nxos cisco_nxos user exec user exec configure terminal
Juniper Junos junos linux cli 1 operational mode configuration mode
HP HPE Comware comware user exec user exec system-view

1: Only works when using the root account

Cleaning up and debugging

Setting raw mode

Defaults to true when calling the function.

Closing the connection

Suggestions

The underlaying library for ssh connections is phpseclib. They recommend the following php extensions for a nice speed boost when using ssh:

These extensions are not required.

Contributions and thanks


All versions of phpmiko with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
phpseclib/phpseclib Version ~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 epiecs/phpmiko contains the following files

Loading the files please wait ....