From da2ac97304b8a5365f660b4aa063f24335bce135 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Sun, 29 Apr 2012 03:08:58 +0200 Subject: [PATCH] Fixes and test --- frontend/classes/class.sshconnector.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/classes/class.sshconnector.php b/frontend/classes/class.sshconnector.php index d33caef..f9f182a 100644 --- a/frontend/classes/class.sshconnector.php +++ b/frontend/classes/class.sshconnector.php @@ -22,8 +22,8 @@ class SshConnector extends CPHPBaseClass public $host = "localhost"; public $port = 22; public $user = "root"; - public $key = "/etc/cvm/key"; - public $pubkey = "/etc/cvm/key.pub"; + public $key = ""; + public $pubkey = ""; public $keytype = "ssh-rsa"; public function RunCommand($command) @@ -64,7 +64,7 @@ class SshConnector extends CPHPBaseClass { $options = array( 'hostkey' => $this->keytype - ) + ); if($this->connection = ssh2_connect($this->host, $this->port, $options)) { @@ -97,9 +97,10 @@ class SshConnector extends CPHPBaseClass return false; } - private function DoCommand() + private function DoCommand($command) { - + $stream = ssh2_exec($this->connection, $command); + echo($stream); } }