diff --git a/src/Ssh/Authentication/PublicKeyFile.php b/src/Ssh/Authentication/PublicKeyFile.php index 2c651f0..28fa02e 100644 --- a/src/Ssh/Authentication/PublicKeyFile.php +++ b/src/Ssh/Authentication/PublicKeyFile.php @@ -37,7 +37,8 @@ public function __construct($username, $publicKeyFile, $privateKeyFile, $passPhr */ public function authenticate($session) { - return ssh2_auth_pubkey_file( + // It may throw n exception AND a warning, see https://github.com/Herzult/php-ssh/issues/53 + return @ssh2_auth_pubkey_file( $session, $this->username, $this->publicKeyFile,