All Projects → DivineOmega → php-ssh-connection

DivineOmega / php-ssh-connection

Licence: LGPL-3.0 license
Provides an elegant syntax to connect to SSH servers and execute commands.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to php-ssh-connection

Wolfssh
wolfSSH is a small, fast, portable SSH implementation, including support for SCP and SFTP.
Stars: ✭ 142 (+65.12%)
Mutual labels:  ssh-client
Hss
An interactive parallel ssh client featuring autocomplete and asynchronous execution.
Stars: ✭ 248 (+188.37%)
Mutual labels:  ssh-client
pony-ssh
vscode plugin for fast remote editing over ssh
Stars: ✭ 26 (-69.77%)
Mutual labels:  ssh-client
Sshj
ssh, scp and sftp for java
Stars: ✭ 2,016 (+2244.19%)
Mutual labels:  ssh-client
Jcabi Ssh
Java SSH client
Stars: ✭ 240 (+179.07%)
Mutual labels:  ssh-client
tallow
Block hosts that attempt to bruteforce SSH using the journald API.
Stars: ✭ 79 (-8.14%)
Mutual labels:  ssh-client
Remmina
Mirror of https://gitlab.com/Remmina/Remmina The GTK+ Remmina Remote Desktop Client
Stars: ✭ 1,705 (+1882.56%)
Mutual labels:  ssh-client
fabula
Minimalist server scripts.
Stars: ✭ 53 (-38.37%)
Mutual labels:  ssh-client
Bastillion
Bastillion is a web-based SSH console that centrally manages administrative access to systems. Web-based administration is combined with management and distribution of user's public SSH keys.
Stars: ✭ 2,730 (+3074.42%)
Mutual labels:  ssh-client
WebSSH
WebSSH allows you to SSH to your remote host anytime, anywhere.
Stars: ✭ 17 (-80.23%)
Mutual labels:  ssh-client
Ssh2 Python
Bindings for libssh2 C library.
Stars: ✭ 166 (+93.02%)
Mutual labels:  ssh-client
Easyssh
The SSH connection manager to make your life easier.
Stars: ✭ 207 (+140.7%)
Mutual labels:  ssh-client
sigil
AWS SSM Session manager client
Stars: ✭ 67 (-22.09%)
Mutual labels:  ssh-client
Sshfs Gui
SSHFS GUI Wrapper for Mac OS X
Stars: ✭ 154 (+79.07%)
Mutual labels:  ssh-client
vaultssh
A Go based Vault client to support ssh sessions, remote commands and scp transfers all in memory
Stars: ✭ 25 (-70.93%)
Mutual labels:  ssh-client
Connectbot
ConnectBot is the first SSH client for Android.
Stars: ✭ 1,763 (+1950%)
Mutual labels:  ssh-client
termscp
🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3
Stars: ✭ 707 (+722.09%)
Mutual labels:  ssh-client
Laravel-ssh-client
SSH Web Client based on Laravel Framework
Stars: ✭ 59 (-31.4%)
Mutual labels:  ssh-client
tabby
A terminal for a more modern age
Stars: ✭ 40,910 (+47469.77%)
Mutual labels:  ssh-client
ssh-autologin
一个基于 ssh 快捷登录远程服务器的脚本
Stars: ✭ 17 (-80.23%)
Mutual labels:  ssh-client

PHP SSH Connection

Build Status Coverage Status

The PHP SSH Connection package provides an elegant syntax to connect to SSH servers and execute commands. It supports both password and public-private keypair authentication, and can easily capture command output and errors.

Installation

You can install the PHP SSH Connection package by running the following Composer command.

composer require divineomega/php-ssh-connection

Usage

See the following basic usage instructions.

$connection = (new SSHConnection())
            ->to('test.rebex.net')
            ->onPort(22)
            ->as('demo')
            ->withPassword('password')
         // ->withPrivateKey($privateKeyPath)
         // ->timeout(0)
            ->connect();

$command = $connection->run('echo "Hello world!"');

$command->getOutput();  // 'Hello World'
$command->getError();   // ''

$connection->upload($localPath, $remotePath);
$connection->download($remotePath, $localPath);

For security, you can fingerprint the remote server and verify the fingerprint remains the same upon each subsequent connection.

$fingerprint = $connection->fingerprint();

if ($newConnection->fingerprint() != $fingerprint) {
    throw new Exception('Fingerprint does not match!');
}

If you wish, you can specify the type of fingerprint you wish to retrieve.

$md5Fingerprint  = $connection->fingerprint(SSHConnection::FINGERPRINT_MD5); // default
$sha1Fingerprint = $connection->fingerprint(SSHConnection::FINGERPRINT_SHA1);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].