|Last Updated|| ||Ratings|| ||Unique User Downloads|| ||Download Rankings|
|2017-03-08 (1 year ago) || 79%||Total: 338 ||All time: 6,895 This week: 451|
This package can run arbitrary length commands in a server with SSH.
It can connect to a given ssh server and execute given commands.
If the commands exceed the maximum length, it write the commands to a file and executes it from there using the bash shell.
It can also execute file manipulation functions like uploading and downloading files, creating directories, changing file permissions, renaming files, reading or writing remote file contents, etc..
Prize: One downloadable e-book of choice by O'Reilly
|SSH is a protocol to communicate with a remote server via a secure connection that allows to execute commands on a remote machine.
However, the length of the commands that can be executed is limited.
This package provides a workaround for this limitation that consists in creating a shell script to execute long commands and execute it using the bash shell.
HOW TO RUN THE EXAMPLES ?
You have to edit the file example.inc.php ; it contains variables that you MUST set to your own configuration needs before running the examples :
- $host : Host name or IP address of your remote server.
- port : Port number of the sshd server on your remote system (usually, 22).
- $user : the user you want to connect to on your remote system.
- $password : User password (set this variable if you want to run the example.password.php script, which uses password-based authentication)
- $private\_key\_file, $public\_key\_file : Paths to the files containing your private and public ssh keys (set these variables if you want to run the example.key.php script, which uses ssh key-based authentication)
- Your remote system MUST be a Unix system for the examples to run as is
If you used puttygen to generate your public and private keys, you have to know that the key that is labelled :
Public key for pasting into OpenSSH authorized_keys file
will not have the correct format for using it as a public key on Unix systems. You will have to go to the Conversions menu and chose the "Export OpenSSH key" option.
- On your remote Unix system, you must add your public key in the .ssh/authorized_keys file of your remote user
- And, of course, you must have an sshd server up and running on your remote system !
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.