Exemplo n.º 1
0
 /**
  * @param Client $client
  * @throws \RuntimeException
  *
  * @return mixed
  */
 public function authenticate(Client $client)
 {
     if (!@ssh2_auth_password($client->getConnection(), $this->getUser(), $this->getPassword())) {
         throw new \RuntimeException('Authentication Failed');
     }
     parent::authenticate($client);
 }
Exemplo n.º 2
0
 /**
  * @param Client $client
  *
  * @throws \RuntimeException
  *
  * @return mixed
  */
 public function authenticate(Client $client)
 {
     if (!@ssh2_auth_pubkey_file($client->getConnection(), $this->getUser(), $this->pubKeyFile, $this->privateKeyFile, $this->passphrase)) {
         throw new \RuntimeException('Authentication Failed');
     }
     parent::authenticate($client);
 }