diff --git a/phpseclib/Net/SSH2.php b/phpseclib/Net/SSH2.php index b5360a3a..de5414b7 100644 --- a/phpseclib/Net/SSH2.php +++ b/phpseclib/Net/SSH2.php @@ -1915,7 +1915,9 @@ class SSH2 */ public function login(string $username, ...$args): bool { - $this->auth[] = func_get_args(); + if (!$this->retry_connect) { + $this->auth[] = func_get_args(); + } // try logging with 'none' as an authentication method first since that's what // PuTTY does